MCP tools | JustMonitorIt API
On this page
<!-- Generated by jmi-server from crates/server/src/api/mcp/tools.rs; do not edit. -->

MCP tools

Every tool works on the organisation of the API token in use. tools/list returns only the tools the token's effective role can use.

ToolLeast roleKindWhat it does
whoamiviewerreadThe API token in use: its name, role, effective role (what it may do: viewer reads; member also changes monitors, incidents and contacts; admin also reads members and the audit log) and the organisation it works on.
get_overviewviewerreadCounts of monitors by status (up, down, degraded, no_data, unknown, paused), the open incidents (newest first, up to 20), the latest status changes and plan usage.
list_locationsviewerreadThe locations monitors are checked from: code (e.g. lon1), name, region (eu, na, ...) and whether it is available.
list_monitorsviewerreadThe organisation's monitors with their current status per location and 24 h uptime, filtered and paged.
get_monitorviewerreadOne monitor: its spec, interval, locations, thresholds, contacts, current status per location, open incident and version (pass it as if_match when updating).
create_monitormemberwriteCreate a monitor.
update_monitormemberwriteChange a monitor: give monitor_id and only the fields to change (JSON merge patch: spec is merged field by field, arrays are replaced whole, null clears a nullable field).
pause_monitormemberwriteStop checking a monitor (and alerting for it) until it is resumed.
resume_monitormemberwriteStart checking a paused monitor again (subject to the plan's limits).
delete_monitormemberwrite, destructiveDelete a monitor with its history, incidents and pending notifications.
preview_checkmemberreadRun a check once, now, from one location, and return its result (outcome, error kind, timings) without saving anything or alerting.
get_monitor_resultsviewerreadA monitor's individual check results, newest first: per location, outcome (up, degraded, down, error = the probe's own problem), error kind and detail, HTTP status, latency and timings.
get_monitor_pingsviewerreadA heartbeat monitor's ping history, newest first (the newest 100 are kept): when each ping arrived, success or fail (the job reported a failure), the HTTP method, the client's address and user agent.
get_monitor_uptimeviewerreadA monitor's uptime ratio and seconds down, degraded, without data and paused, for the windows 24h, 7d, 30d and 90d, or for one from-to range.
set_monitor_contactsmemberwriteReplace the set of contacts a monitor alerts (contact ids con_… from list_contacts; an empty list alerts nobody).
list_incidentsviewerreadIncidents (a monitor down or degraded, confirmed from several locations), newest first: status open or resolved, severity, cause, duration, acknowledgement.
get_incidentviewerreadOne incident with its timeline (opened, status changes, acknowledgement, notes, resolution), the root cause per location and the notifications sent.
acknowledge_incidentmemberwriteAcknowledge an open incident: reminders stop and the team sees someone is on it.
add_incident_notememberwriteAdd a note (1-2000 characters) to an incident's timeline.
list_contactsviewerreadWhere alerts go: email addresses, SMS and phone call numbers, Pushover, Discord, PagerDuty, Slack and Microsoft Teams destinations and webhooks, with their status (unverified, active, disabled) and the alerts they get (down, recovered, degraded).
list_notificationsviewerreadAlerts sent or attempted, newest first, with each delivery attempt and the provider's status.
list_membersadminreadThe organisation's members with their roles (owner, admin, member, viewer) and when they were last active.
get_audit_logadminreadWho changed what in the organisation, newest first: actor, action (e.g. monitor.updated), target and changed fields.

whoami

The API token in use: its name, role, effective role (what it may do: viewer reads; member also changes monitors, incidents and contacts; admin also reads members and the audit log) and the organisation it works on. Every other tool acts on that organisation.

Least role: viewer. Annotations: readOnly true, destructive false, idempotent true.

Arguments: none.

get_overview

Counts of monitors by status (up, down, degraded, no_data, unknown, paused), the open incidents (newest first, up to 20), the latest status changes and plan usage. Start here to answer "is anything down?".

Least role: viewer. Annotations: readOnly true, destructive false, idempotent true.

Arguments: none.

list_locations

The locations monitors are checked from: code (e.g. lon1), name, region (eu, na, ...) and whether it is available. Use the codes and regions in a monitor's locations and in preview_check.

Least role: viewer. Annotations: readOnly true, destructive false, idempotent true.

Arguments: none.

list_monitors

The organisation's monitors with their current status per location and 24 h uptime, filtered and paged. Pass next_cursor back as cursor for the next page.

Least role: viewer. Annotations: readOnly true, destructive false, idempotent true.

ArgumentTypeRequiredNotes
cursorstringnoOpaque next_cursor of the previous page.
dirstringnoOne of: asc, desc.
kindstringnoComma-separated monitor kinds: icmp, http, http_adv, tcp, ssl_expiry, domain_expiry, imap, smtp, heartbeat.
labelstringnoOne label.
limitintegernoPage size, default 50.
qstringnoSubstring of the name or target.
run_statestringnoComma-separated: active, paused, system_paused.
sortstringnoOne of: created_at, name, status, status_since.
statusstringnoComma-separated: unknown, up, down, degraded, no_data, paused.

get_monitor

One monitor: its spec, interval, locations, thresholds, contacts, current status per location, open incident and version (pass it as if_match when updating).

Least role: viewer. Annotations: readOnly true, destructive false, idempotent true.

ArgumentTypeRequiredNotes
monitor_idstringyesMonitor id (mon_…).

create_monitor

Create a monitor. kind is one of icmp, http, http_adv, tcp, ssl_expiry, domain_expiry, imap, smtp, heartbeat, and spec holds that kind's fields: icmp {host}; tcp {host, port}; http {url, keyword?}; http_adv {url, method?, headers?, body?, expected_status? e.g. ["200-299"], assertions? e.g. [{"type": "body_contains", "value": "ok"}]}; ssl_expiry {host, port?, cert_expiry_warn_days?}; domain_expiry {domain, expiry_warn_days?} (interval_s must be 86400; omit locations and the thresholds); imap/smtp {host, port, tls: implicit|starttls|none}; heartbeat {grace_s?} (interval_s is the period between pings, 60-604800; omit locations and the thresholds; the response's ping_url is what the job requests). interval_s is 30, 60, 120, 300, 600, 900, 1800 or 3600 (at least the plan minimum). locations is {"mode": "regions", "regions": ["eu", "na"]} or {"mode": "locations", "codes": ["lon1", "fra1"]} (at least 2 locations; codes from list_locations). Omitting contact_ids attaches the organisation's auto-attach contacts. Test a target first with preview_check. Validation problems come back as an error naming each field.

Least role: member. Annotations: readOnly false, destructive false, idempotent false.

ArgumentTypeRequiredNotes
contact_idsarray | nullnoAt most 100; omitted = every auto_attach contact.
degraded_after_msinteger | nullnohttp_adv only; 100-30000 and below the time budget; null = off.
failure_thresholdinteger | nullno1-10, default 2; for domain_expiry 1, the default (a second probe confirms each change instead); for heartbeat 1.
idempotency_keystringnoOptional: repeat a call with the same key to get the first result instead of creating twice.
interval_sintegeryes30, 60, 120, 300, 600, 900, 1800 or 3600, at least the plan minimum. domain_expiry: 86400 only. heartbeat: the period between pings, 60-604800 (no plan minimum).
kindMonitorKindyesImmutable after create.
labelsarraynoAt most 10, each 1-32 characters of [a-z0-9-_.].
locationssee schemano
namestringyes1-100 characters.
pausedbooleanno
recovery_thresholdinteger | nullno1-10, default 2; for domain_expiry and heartbeat 1, the default.
reminder_interval_sinteger | nullnonull = no reminders; 900-86400.
specMonitorSpecInputyesThe per-kind spec without the type tag (probes-and-checks.md §5): the MonitorSpecInput schema of kind; secret fields are write-only.

update_monitor

Change a monitor: give monitor_id and only the fields to change (JSON merge patch: spec is merged field by field, arrays are replaced whole, null clears a nullable field). kind cannot change. paused: true|false pauses or resumes. Pass the version you read as if_match to avoid overwriting someone else's change.

Least role: member. Annotations: readOnly false, destructive false, idempotent true.

ArgumentTypeRequiredNotes
contact_idsarray | nullno
degraded_after_msinteger | nullno
failure_thresholdinteger | nullno
if_matchintegernoThe monitor's version you last read; the call fails with precondition_failed if it changed since.
interval_sinteger | nullno
kindsee schemano
labelsarray | nullno
locationssee schemano
monitor_idstringyesMonitor id (mon_…).
namestring | nullno
pausedboolean | nullnofalse runs the same checks as POST .../resume.
recovery_thresholdinteger | nullno
reminder_interval_sinteger | nullno
specobject | nullnoMerged into the stored spec (RFC 7396): any subset of the MonitorSpecInput schema of the monitor's kind.

pause_monitor

Stop checking a monitor (and alerting for it) until it is resumed. An open incident is resolved as paused.

Least role: member. Annotations: readOnly false, destructive false, idempotent true.

ArgumentTypeRequiredNotes
monitor_idstringyesMonitor id (mon_…).

resume_monitor

Start checking a paused monitor again (subject to the plan's limits).

Least role: member. Annotations: readOnly false, destructive false, idempotent true.

ArgumentTypeRequiredNotes
monitor_idstringyesMonitor id (mon_…).

delete_monitor

Delete a monitor with its history, incidents and pending notifications. This cannot be undone; confirm with the user first.

Least role: member. Annotations: readOnly false, destructive true, idempotent true.

ArgumentTypeRequiredNotes
if_matchintegernoThe monitor's version you last read; the call fails with precondition_failed if it changed since.
monitor_idstringyesMonitor id (mon_…).

preview_check

Run a check once, now, from one location, and return its result (outcome, error kind, timings) without saving anything or alerting. Takes kind and spec as for create_monitor and a location code. Use it to test a target before creating a monitor. Can take up to about 45 seconds.

Least role: member. Annotations: readOnly true, destructive false, idempotent false.

ArgumentTypeRequiredNotes
kindMonitorKindyes
locationstringyesLocation code.
specMonitorSpecInputyesThe spec as in MonitorInput (secrets inline).

get_monitor_results

A monitor's individual check results, newest first: per location, outcome (up, degraded, down, error = the probe's own problem), error kind and detail, HTTP status, latency and timings. Default window: the last 24 hours; at most 7 days per call.

Least role: viewer. Annotations: readOnly true, destructive false, idempotent true.

ArgumentTypeRequiredNotes
cursorstringnoOpaque next_cursor of the previous page.
fromstringnoRFC 3339 timestamp.
limitintegernoPage size, default 50.
locationstringnoA location code.
monitor_idstringyesMonitor id (mon_…).
outcomestringnoComma-separated: up, degraded, down, error.
tostringnoRFC 3339 timestamp.

get_monitor_pings

A heartbeat monitor's ping history, newest first (the newest 100 are kept): when each ping arrived, success or fail (the job reported a failure), the HTTP method, the client's address and user agent.

Least role: viewer. Annotations: readOnly true, destructive false, idempotent true.

ArgumentTypeRequiredNotes
limitintegernoHow many, default 50.
monitor_idstringyesMonitor id (mon_…).

get_monitor_uptime

A monitor's uptime ratio and seconds down, degraded, without data and paused, for the windows 24h, 7d, 30d and 90d, or for one from-to range.

Least role: viewer. Annotations: readOnly true, destructive false, idempotent true.

ArgumentTypeRequiredNotes
fromstringnoRFC 3339 timestamp.
monitor_idstringyesMonitor id (mon_…).
tostringnoRFC 3339 timestamp.
windowsstringnoComma-separated of 24h, 7d, 30d, 90d (default all).

set_monitor_contacts

Replace the set of contacts a monitor alerts (contact ids con_… from list_contacts; an empty list alerts nobody).

Least role: member. Annotations: readOnly false, destructive false, idempotent true.

ArgumentTypeRequiredNotes
contact_idsarrayyes
monitor_idstringyesMonitor id (mon_…).

list_incidents

Incidents (a monitor down or degraded, confirmed from several locations), newest first: status open or resolved, severity, cause, duration, acknowledgement.

Least role: viewer. Annotations: readOnly true, destructive false, idempotent true.

ArgumentTypeRequiredNotes
cursorstringnoOpaque next_cursor of the previous page.
fromstringnoRFC 3339 timestamp.
limitintegernoPage size, default 50.
monitor_idstringnoMonitor id (mon_…).
severitystringnoOne of: down, degraded.
statusstringnoOne of: open, resolved.
tostringnoRFC 3339 timestamp.

get_incident

One incident with its timeline (opened, status changes, acknowledgement, notes, resolution), the root cause per location and the notifications sent.

Least role: viewer. Annotations: readOnly true, destructive false, idempotent true.

ArgumentTypeRequiredNotes
incident_idstringyesIncident id (inc_…).

acknowledge_incident

Acknowledge an open incident: reminders stop and the team sees someone is on it.

Least role: member. Annotations: readOnly false, destructive false, idempotent true.

ArgumentTypeRequiredNotes
incident_idstringyesIncident id (inc_…).

add_incident_note

Add a note (1-2000 characters) to an incident's timeline.

Least role: member. Annotations: readOnly false, destructive false, idempotent false.

ArgumentTypeRequiredNotes
bodystringyes
incident_idstringyesIncident id (inc_…).

list_contacts

Where alerts go: email addresses, SMS and phone call numbers, Pushover, Discord, PagerDuty, Slack and Microsoft Teams destinations and webhooks, with their status (unverified, active, disabled) and the alerts they get (down, recovered, degraded). Secrets are never shown.

Least role: viewer. Annotations: readOnly true, destructive false, idempotent true.

ArgumentTypeRequiredNotes
cursorstringnoOpaque next_cursor of the previous page.
kindstringnoOne of: email, sms, voice, pushover, discord, pagerduty, slack, webhook, teams.
limitintegernoPage size, default 50.
statusstringnoOne of: unverified, active, disabled.

list_notifications

Alerts sent or attempted, newest first, with each delivery attempt and the provider's status. Filter by contact, incident or monitor to answer "was anyone told?".

Least role: viewer. Annotations: readOnly true, destructive false, idempotent true.

ArgumentTypeRequiredNotes
contact_idstringno
cursorstringnoOpaque next_cursor of the previous page.
incident_idstringnoIncident id (inc_…).
kindstringnodown, recovered, degraded, flapping, reminder, test, ...
limitintegernoPage size, default 50.
monitor_idstringnoMonitor id (mon_…).
statusstringnoOne of: pending, sending, sent, failed, cancelled, suppressed.

list_members

The organisation's members with their roles (owner, admin, member, viewer) and when they were last active.

Least role: admin. Annotations: readOnly true, destructive false, idempotent true.

Arguments: none.

get_audit_log

Who changed what in the organisation, newest first: actor, action (e.g. monitor.updated), target and changed fields. Entries made with an API token name it in data.api_token.

Least role: admin. Annotations: readOnly true, destructive false, idempotent true.

ArgumentTypeRequiredNotes
actionstringnoExact action, e.g. monitor.updated.
actorstringno
cursorstringnoOpaque next_cursor of the previous page.
limitintegernoPage size, default 50.