fettle-mcp 1.7.0 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -27
- package/contracts/mcp_tools.json +253 -17
- package/dist/config.js +2 -2
- package/dist/config.js.map +1 -1
- package/dist/contract.d.ts +14 -0
- package/dist/contract.js +18 -6
- package/dist/contract.js.map +1 -1
- package/dist/errors.js +4 -3
- package/dist/errors.js.map +1 -1
- package/dist/executor.d.ts +6 -2
- package/dist/executor.js +63 -2
- package/dist/executor.js.map +1 -1
- package/dist/server.js +11 -1
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ install from the registry rather than from a hand-edited config file.
|
|
|
24
24
|
## Requirements
|
|
25
25
|
|
|
26
26
|
- Node.js 20 or newer
|
|
27
|
-
- A Fettle account and an API key (
|
|
27
|
+
- A Fettle account and an API key (API keys in the dashboard sidebar: https://dashboard.fettle.sh/api-keys)
|
|
28
28
|
|
|
29
29
|
An API key belongs to one organization and carries either **read** or **write**
|
|
30
30
|
scope. Read-scope keys can list and inspect; the write tools below need a
|
|
@@ -118,7 +118,7 @@ FETTLE_API_KEY = "fettle_your_key_here"
|
|
|
118
118
|
|
|
119
119
|
## Tools
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
57 tools, grouped by what they work on. Read-scope keys can call the `read` ones; everything marked `write` needs a write-scope key.
|
|
122
122
|
|
|
123
123
|
Every tool carries the MCP hints `readOnlyHint`, `destructiveHint`, `idempotentHint` and `openWorldHint`, so a client can tell reads from changes without parsing names and ask for confirmation only where it matters. Only the five `delete_*` tools are destructive. `preview_maintenance_window` and `check_target` are marked read-only although they need a write-scope key: they change nothing. `check_now` and `check_target` reach the target host, so they are open-world.
|
|
124
124
|
|
|
@@ -145,22 +145,22 @@ Every tool whose result is a JSON object declares an `outputSchema` and returns
|
|
|
145
145
|
|
|
146
146
|
### Results and uptime
|
|
147
147
|
|
|
148
|
-
| Tool | Scope | What it does
|
|
149
|
-
| ----------------------------- | ----- |
|
|
150
|
-
| `get_uptime_summary` | read | Uptime, average response time and incident counts over 24h / 7d / 30d at once.
|
|
151
|
-
| `get_uptime_daily` | read | A monitor's uptime for each UTC day, oldest first.
|
|
152
|
-
| `get_response_time_by_region` | read | Per-region response time over 24h, 7d
|
|
153
|
-
| `list_check_results` | read |
|
|
148
|
+
| Tool | Scope | What it does |
|
|
149
|
+
| ----------------------------- | ----- | --------------------------------------------------------------------------------------------------------------- |
|
|
150
|
+
| `get_uptime_summary` | read | Uptime, average response time and incident counts over 24h / 7d / 30d at once, or over a date range. |
|
|
151
|
+
| `get_uptime_daily` | read | A monitor's uptime for each UTC day, oldest first, for the last N days or a date range. |
|
|
152
|
+
| `get_response_time_by_region` | read | Per-region response time over 24h, 7d, 30d, 90d, 180d or 365d, plus the current slowdown, or over a date range. |
|
|
153
|
+
| `list_check_results` | read | Recent raw check results of a monitor (about 3 days), newest first, by region, status or period. |
|
|
154
154
|
|
|
155
155
|
### Incidents
|
|
156
156
|
|
|
157
|
-
| Tool | Scope | What it does
|
|
158
|
-
| ------------------------ | ----- |
|
|
159
|
-
| `list_incidents` | read | List incidents by monitor, status, cause or period
|
|
160
|
-
| `get_incident` | read | Read one incident with its cause, every alert attempt and how it was acknowledged.
|
|
161
|
-
| `get_incident_diagnosis` | read | What changed around a monitor incident, with a repro command and the next calls to make.
|
|
162
|
-
| `get_incident_context` | read | Per-region checks, a timeline, downtime periods and who acknowledged an incident, by name.
|
|
163
|
-
| `acknowledge_incident` | write | Acknowledge an open incident so repeat notifications stop.
|
|
157
|
+
| Tool | Scope | What it does |
|
|
158
|
+
| ------------------------ | ----- | ---------------------------------------------------------------------------------------------------------- |
|
|
159
|
+
| `list_incidents` | read | List incidents by monitor or heartbeat, status, cause, calendar range or period (last 30 days by default). |
|
|
160
|
+
| `get_incident` | read | Read one incident with its cause, every alert attempt and how it was acknowledged. |
|
|
161
|
+
| `get_incident_diagnosis` | read | What changed around a monitor incident, with a repro command and the next calls to make. |
|
|
162
|
+
| `get_incident_context` | read | Per-region checks, a timeline, downtime periods and who acknowledged an incident, by name. |
|
|
163
|
+
| `acknowledge_incident` | write | Acknowledge an open incident so repeat notifications stop. |
|
|
164
164
|
|
|
165
165
|
### Deploys and changes
|
|
166
166
|
|
|
@@ -172,15 +172,16 @@ Every tool whose result is a JSON object declares an `outputSchema` and returns
|
|
|
172
172
|
|
|
173
173
|
### Heartbeats
|
|
174
174
|
|
|
175
|
-
| Tool
|
|
176
|
-
|
|
|
177
|
-
| `list_heartbeats`
|
|
178
|
-
| `get_heartbeat`
|
|
179
|
-
| `
|
|
180
|
-
| `
|
|
181
|
-
| `
|
|
182
|
-
| `
|
|
183
|
-
| `
|
|
175
|
+
| Tool | Scope | What it does |
|
|
176
|
+
| ---------------------- | ----- | ------------------------------------------------------------------------------------ |
|
|
177
|
+
| `list_heartbeats` | read | List heartbeat (cron / dead-man's-switch) monitors and when each was last pinged. |
|
|
178
|
+
| `get_heartbeat` | read | Read one heartbeat, its ping URL (masked for a read-only key) and when it is due. |
|
|
179
|
+
| `get_heartbeat_uptime` | read | A heartbeat's uptime over the last N days or a date range, in total and per UTC day. |
|
|
180
|
+
| `create_heartbeat` | write | Create a heartbeat monitor and get the URL a scheduled job should ping. |
|
|
181
|
+
| `update_heartbeat` | write | Change a heartbeat's name, period, grace, channels or tags. |
|
|
182
|
+
| `pause_heartbeat` | write | Pause a heartbeat: it is not reported late and its pings are ignored. |
|
|
183
|
+
| `resume_heartbeat` | write | Resume a paused heartbeat. |
|
|
184
|
+
| `delete_heartbeat` | write | Delete a heartbeat for good; its ping URL stops working. |
|
|
184
185
|
|
|
185
186
|
### Maintenance windows
|
|
186
187
|
|
|
@@ -240,10 +241,10 @@ humans and for clients that do not surface server instructions.
|
|
|
240
241
|
<!-- prettier-ignore-start -->
|
|
241
242
|
<!-- agent-guide:start -->
|
|
242
243
|
```text
|
|
243
|
-
Fettle is an uptime monitoring service. The tools see only the caller's organization. Channels
|
|
244
|
+
Fettle is an uptime monitoring service. The tools see only the caller's organization. Channels and status pages are created and configured only in the dashboard (https://dashboard.fettle.sh); members, API keys and billing live only there. Read a tool's description before its first call.
|
|
244
245
|
|
|
245
246
|
FINDING THINGS
|
|
246
|
-
list_monitors gives one short row per monitor
|
|
247
|
+
list_monitors gives one short row per monitor. Broken now: status ["DOWN", "DEGRADED"]. Certificates expiring first: type ["SSL"], sort "ssl_expiry". What changed on targets (DNS answers, certificates) since a deploy: list_changes with since.
|
|
247
248
|
|
|
248
249
|
PLAN LIMITS
|
|
249
250
|
Call get_plan_usage before creating anything (null means no limit). A 403 names a broken limit or unknown region: change the request or tell the user; never retry it unchanged.
|
|
@@ -385,7 +386,7 @@ variable. Check the `env` block of the config above, then fully restart the
|
|
|
385
386
|
client: most clients read MCP config only at launch.
|
|
386
387
|
|
|
387
388
|
**`Authentication failed`** — the key is wrong, revoked, or from a deleted
|
|
388
|
-
organization. Create a fresh one in
|
|
389
|
+
organization. Create a fresh one under API keys in the dashboard sidebar.
|
|
389
390
|
|
|
390
391
|
**`This tool requires an API key with write scope`** — the key is read-only. Create
|
|
391
392
|
a write-scoped key; there is no way to widen an existing key's scope.
|
package/contracts/mcp_tools.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
|
-
"instructions": "Fettle is an uptime monitoring service. The tools see only the caller's organization. Channels
|
|
3
|
+
"instructions": "Fettle is an uptime monitoring service. The tools see only the caller's organization. Channels and status pages are created and configured only in the dashboard (https://dashboard.fettle.sh); members, API keys and billing live only there. Read a tool's description before its first call.\n\nFINDING THINGS\nlist_monitors gives one short row per monitor. Broken now: status [\"DOWN\", \"DEGRADED\"]. Certificates expiring first: type [\"SSL\"], sort \"ssl_expiry\". What changed on targets (DNS answers, certificates) since a deploy: list_changes with since.\n\nPLAN LIMITS\nCall get_plan_usage before creating anything (null means no limit). A 403 names a broken limit or unknown region: change the request or tell the user; never retry it unchanged.\n\nCREATING MONITORS\n- check_target probes a target once before create_monitor.\n- regions: unless the user names some, use every limits.allowed_regions code, up to max_regions; SSL, DNS and port-list TCP take one.\n- type and target never change after create.\n- After create, tell the user the interval and regions chosen; offer to change the interval (update_monitor).\n- channel_ids come from list_channels (email addresses are channels too); omitted on create alerts every working channel. If no channel works, the organization's owner is emailed.\n- update tools change only the fields you pass; never send null. A monitor's config is replaced whole: resend every field to keep.\n- Exposed ports on a server: follow get_exposed_ports_preset.\n\nMANY MONITORS AT ONCE\nCreate many with bulk_create_monitors. Find ids with list_monitors, then bulk_pause_monitors, bulk_resume_monitors or bulk_update_monitors, all or nothing. There is no bulk delete.\n\nTAGS\nCall list_tags first and reuse names, such as env:prod.\n\nHEARTBEATS\nA job calls ping_url when it succeeds. Job every N seconds, alert after T seconds of silence: period_seconds = N, grace_seconds = T - N.\n\nMAINTENANCE\nBefore a deploy or reboot, create_maintenance_window instead of pausing monitors: checks keep running, no incident opens, no down or change alert goes out (certificate and domain warnings still do). Not for heartbeats.\n\nDEPLOYS\nAfter a deploy, offer verify_deploy; run it only if the user agrees, never on your own. If yes: record_deploy, check_now the monitors, wait a minute, verify_deploy with since = deployed_at. Reuse the same deployed_at on every retry. On INSUFFICIENT_DATA wait retry_after_seconds, check_now monitors with needs_fresh_checks, call again; stop when it is null. REGRESSED and FAIL are not monitor statuses. Never roll back without asking.\n\nOUTAGES\nlist_monitors status [\"DOWN\"] -> list_incidents (monitor_id, status \"open\") -> get_incident_diagnosis (READY: follow agent.next_calls; else list_check_results) -> get_incident_context (regions, timeline, who acknowledged) -> get_incident. Pasted Fettle alert or dashboard /incidents/<uuid> link: call get_incident_diagnosis on it. acknowledge_incident stops repeat alerts. create_status_page_incident and post_status_page_update can email subscribers: confirm the text with the user first. draft_status_page_post writes the text for those two; it never publishes.\n\nERRORS (in a failed call's text)\n- \"Authentication failed\": the credential is missing, revoked or expired, the address is not allowed, or its user lost access. Do not retry; tell the user.\n- \"This tool requires an API key with write scope\" or \"needs write access\": read-only; tell the user.\n- \"Invalid argument(s)\" or \"Invalid request:\": fix what it names, retry.\n- \"Forbidden:\": a plan limit, an unknown region, or the user's role; the reason says which.\n- \"Not found:\": no such id in this organization.\n- \"Rate limited\": wait the seconds given. All API keys and app connections share the organization's per-minute budget. One busy integration can use it all.\n- \"the API returned 5xx\": retry once later.\n- \"does not accept argument(s)\": drop the ones named.\n- \"Request failed with status N\": read the reason; do not retry unchanged.\n",
|
|
4
4
|
"tools": [
|
|
5
5
|
{
|
|
6
6
|
"name": "list_monitors",
|
|
@@ -3434,7 +3434,7 @@
|
|
|
3434
3434
|
{
|
|
3435
3435
|
"name": "get_uptime_summary",
|
|
3436
3436
|
"title": "Get uptime for a monitor",
|
|
3437
|
-
"description": "Report one monitor's uptime percentage, average response time and incident count over the last 24 hours, 7 days and 30 days at once, to answer how reliable it has been. For a day-by-day series use get_uptime_daily; for response time per region use get_response_time_by_region; for the individual failures use list_check_results. Returns monitor_id and windows keyed 24h, 7d and 30d, each with uptime_percentage, downtime_seconds, observed_seconds, window_start (later than the window's start when the monitor is younger), total_checks, up_checks, down_checks, degraded_checks, incident_count and avg_response_time_ms. uptime_percentage is the share of observed time outside confirmed outages (an outage counts from the first failing probe to the first probe that is not DOWN; a failure only one region saw does not count; maintenance counts as up; hours with no checks are left out; null when nothing was observed). The check counts are informational: a failed check outside a confirmed outage does not lower uptime_percentage.",
|
|
3437
|
+
"description": "Report one monitor's uptime percentage, average response time and incident count over the last 24 hours, 7 days and 30 days at once, to answer how reliable it has been. For a day-by-day series use get_uptime_daily; for response time per region use get_response_time_by_region; for the individual failures use list_check_results. Returns monitor_id and windows keyed 24h, 7d and 30d, each with uptime_percentage, downtime_seconds, observed_seconds, window_start (later than the window's start when the monitor is younger), total_checks, up_checks, down_checks, degraded_checks, incident_count and avg_response_time_ms. uptime_percentage is the share of observed time outside confirmed outages (an outage counts from the first failing probe to the first probe that is not DOWN; a failure only one region saw does not count; maintenance counts as up; hours with no checks are left out; null when nothing was observed). The check counts are informational: a failed check outside a confirmed outage does not lower uptime_percentage. A window longer than the plan's history has null uptime_percentage and avg_response_time_ms and zero counts; get_plan_usage shows the plan's history days. With from (and optionally to) the answer has one window, keyed range, over those UTC days instead of 24h, 7d and 30d; a range entirely older than the plan's history, or ending before the monitor was created, has null uptime_percentage and avg_response_time_ms and zero counts.",
|
|
3438
3438
|
"scope": "read",
|
|
3439
3439
|
"input_schema": {
|
|
3440
3440
|
"type": "object",
|
|
@@ -3443,6 +3443,16 @@
|
|
|
3443
3443
|
"format": "uuid",
|
|
3444
3444
|
"type": "string",
|
|
3445
3445
|
"description": "The monitor's uuid from list_monitors. An id that is not a monitor of this organization, or a deleted one, is a 404."
|
|
3446
|
+
},
|
|
3447
|
+
"from": {
|
|
3448
|
+
"format": "date",
|
|
3449
|
+
"type": "string",
|
|
3450
|
+
"description": "First UTC date of a calendar range, YYYY-MM-DD, inclusive. The range is cut to the plan's history; a range entirely older than it returns no data."
|
|
3451
|
+
},
|
|
3452
|
+
"to": {
|
|
3453
|
+
"format": "date",
|
|
3454
|
+
"type": "string",
|
|
3455
|
+
"description": "Last UTC date of a calendar range, YYYY-MM-DD, inclusive; needs from. Without it, or after today, the range ends today."
|
|
3446
3456
|
}
|
|
3447
3457
|
},
|
|
3448
3458
|
"required": [
|
|
@@ -3456,7 +3466,10 @@
|
|
|
3456
3466
|
"path_params": [
|
|
3457
3467
|
"monitor_id"
|
|
3458
3468
|
],
|
|
3459
|
-
"query": [
|
|
3469
|
+
"query": [
|
|
3470
|
+
"from",
|
|
3471
|
+
"to"
|
|
3472
|
+
],
|
|
3460
3473
|
"body": false,
|
|
3461
3474
|
"fixed_query": {}
|
|
3462
3475
|
},
|
|
@@ -3549,7 +3562,7 @@
|
|
|
3549
3562
|
{
|
|
3550
3563
|
"name": "get_plan_usage",
|
|
3551
3564
|
"title": "Get plan usage",
|
|
3552
|
-
"description": "Show the organization's plan, its limits and current usage, to check that new monitors, heartbeats or regions fit before creating them or to explain a 403 naming a limit. Region codes and their cities come from list_regions; billing changes happen only in the dashboard. Values are current as of the call. Returns plan (one of FREE, PLUS, PRO, MAX, ENTERPRISE), limits and usage. limits: max_monitors, min_interval_seconds, max_fast_monitors (monitors below fast_interval_threshold_seconds, 60), max_regions per monitor, allowed_regions, max_heartbeats, max_maintenance_windows, history_retention_days, api_rate_limit_per_minute (shared by the whole organization), renotify_interval_seconds and renotify_max_count (how often and how many times an open, unacknowledged incident is alerted again; 0 means no reminders); null means no limit. usage: monitors (paused included), fast_monitors and
|
|
3565
|
+
"description": "Show the organization's plan, its limits and current usage, to check that new monitors, heartbeats or regions fit before creating them or to explain a 403 naming a limit. Region codes and their cities come from list_regions; billing changes happen only in the dashboard. Values are current as of the call. Returns plan (one of FREE, PLUS, PRO, MAX, ENTERPRISE), limits and usage. limits: max_monitors, min_interval_seconds, max_fast_monitors (monitors below fast_interval_threshold_seconds, 60), max_regions per monitor, allowed_regions, max_heartbeats, max_maintenance_windows, max_status_pages, max_status_page_subscribers, max_channels, max_api_keys, history_retention_days, api_rate_limit_per_minute (shared by the whole organization), renotify_interval_seconds and renotify_max_count (how often and how many times an open, unacknowledged incident is alerted again; 0 means no reminders); null means no limit. usage: monitors (paused included), fast_monitors, heartbeats, channels (member email channels excluded), api_keys (keys that still authenticate) and status_page_subscribers (confirmed, organization-wide), each next to its limit above.",
|
|
3553
3566
|
"scope": "read",
|
|
3554
3567
|
"input_schema": {
|
|
3555
3568
|
"type": "object",
|
|
@@ -3732,12 +3745,27 @@
|
|
|
3732
3745
|
},
|
|
3733
3746
|
"heartbeats": {
|
|
3734
3747
|
"type": "integer"
|
|
3748
|
+
},
|
|
3749
|
+
"channels": {
|
|
3750
|
+
"description": "Notification channels counted toward max_channels (member email channels never count).",
|
|
3751
|
+
"type": "integer"
|
|
3752
|
+
},
|
|
3753
|
+
"api_keys": {
|
|
3754
|
+
"description": "API keys that still authenticate (not revoked, deleted or expired); count toward max_api_keys.",
|
|
3755
|
+
"type": "integer"
|
|
3756
|
+
},
|
|
3757
|
+
"status_page_subscribers": {
|
|
3758
|
+
"description": "Confirmed status page subscribers across the whole organization (the cap is per organization).",
|
|
3759
|
+
"type": "integer"
|
|
3735
3760
|
}
|
|
3736
3761
|
},
|
|
3737
3762
|
"required": [
|
|
3738
3763
|
"monitors",
|
|
3739
3764
|
"fast_monitors",
|
|
3740
|
-
"heartbeats"
|
|
3765
|
+
"heartbeats",
|
|
3766
|
+
"channels",
|
|
3767
|
+
"api_keys",
|
|
3768
|
+
"status_page_subscribers"
|
|
3741
3769
|
],
|
|
3742
3770
|
"type": "object"
|
|
3743
3771
|
}
|
|
@@ -3772,7 +3800,12 @@
|
|
|
3772
3800
|
"monitor_id": {
|
|
3773
3801
|
"format": "uuid",
|
|
3774
3802
|
"type": "string",
|
|
3775
|
-
"description": "Keep one monitor's incidents: its uuid from list_monitors."
|
|
3803
|
+
"description": "Keep one monitor's incidents: its uuid from list_monitors. Not together with heartbeat_id (a 422)."
|
|
3804
|
+
},
|
|
3805
|
+
"heartbeat_id": {
|
|
3806
|
+
"format": "uuid",
|
|
3807
|
+
"type": "string",
|
|
3808
|
+
"description": "Keep one heartbeat's incidents: its uuid from list_heartbeats. Not together with monitor_id (a 422)."
|
|
3776
3809
|
},
|
|
3777
3810
|
"status": {
|
|
3778
3811
|
"enum": [
|
|
@@ -3807,7 +3840,17 @@
|
|
|
3807
3840
|
"maximum": 365,
|
|
3808
3841
|
"minimum": 1,
|
|
3809
3842
|
"type": "integer",
|
|
3810
|
-
"description": "Keep incidents active within the last N days, 1 to 365.
|
|
3843
|
+
"description": "Keep incidents active within the last N days, 1 to 365. Without period_days, from, to or all_time the tool lists the last 30 days."
|
|
3844
|
+
},
|
|
3845
|
+
"from": {
|
|
3846
|
+
"format": "date",
|
|
3847
|
+
"type": "string",
|
|
3848
|
+
"description": "First UTC date of a calendar range, YYYY-MM-DD, inclusive. An incident is listed if it was active on any day of the range. Not together with period_days."
|
|
3849
|
+
},
|
|
3850
|
+
"to": {
|
|
3851
|
+
"format": "date",
|
|
3852
|
+
"type": "string",
|
|
3853
|
+
"description": "Last UTC date of a calendar range, YYYY-MM-DD, inclusive; without it the range runs to now. Not together with period_days."
|
|
3811
3854
|
},
|
|
3812
3855
|
"sort": {
|
|
3813
3856
|
"enum": [
|
|
@@ -3815,6 +3858,10 @@
|
|
|
3815
3858
|
],
|
|
3816
3859
|
"type": "string",
|
|
3817
3860
|
"description": "attention: open unacknowledged first, then open acknowledged, then resolved; newest first within each. Omit it for newest first."
|
|
3861
|
+
},
|
|
3862
|
+
"all_time": {
|
|
3863
|
+
"type": "boolean",
|
|
3864
|
+
"description": "true lists incidents of all time, one page at a time. Not together with period_days, from or to."
|
|
3818
3865
|
}
|
|
3819
3866
|
},
|
|
3820
3867
|
"required": [],
|
|
@@ -3828,13 +3875,28 @@
|
|
|
3828
3875
|
"page",
|
|
3829
3876
|
"size",
|
|
3830
3877
|
"monitor_id",
|
|
3878
|
+
"heartbeat_id",
|
|
3831
3879
|
"status",
|
|
3832
3880
|
"cause",
|
|
3833
3881
|
"period_days",
|
|
3882
|
+
"from",
|
|
3883
|
+
"to",
|
|
3834
3884
|
"sort"
|
|
3835
3885
|
],
|
|
3836
3886
|
"body": false,
|
|
3837
|
-
"fixed_query": {}
|
|
3887
|
+
"fixed_query": {},
|
|
3888
|
+
"default_query": {
|
|
3889
|
+
"period_days": "30"
|
|
3890
|
+
},
|
|
3891
|
+
"default_query_unless": [
|
|
3892
|
+
"period_days",
|
|
3893
|
+
"from",
|
|
3894
|
+
"to",
|
|
3895
|
+
"all_time"
|
|
3896
|
+
],
|
|
3897
|
+
"local_flags": [
|
|
3898
|
+
"all_time"
|
|
3899
|
+
]
|
|
3838
3900
|
},
|
|
3839
3901
|
"annotations": {
|
|
3840
3902
|
"read_only_hint": true,
|
|
@@ -4839,6 +4901,153 @@
|
|
|
4839
4901
|
"type": "object"
|
|
4840
4902
|
}
|
|
4841
4903
|
},
|
|
4904
|
+
{
|
|
4905
|
+
"name": "get_heartbeat_uptime",
|
|
4906
|
+
"title": "Get a heartbeat's uptime",
|
|
4907
|
+
"description": "Report one heartbeat's uptime over the last N days or a date range, in total and per UTC day, to answer how reliable a job has been. Uptime is the share of time since the heartbeat was created that no incident was open; paused time counts as up; a heartbeat that never pinged and had no incident has a null uptime_percentage. Returns heartbeat_id, window_start (the window's first day at 00:00 UTC, or the creation if later; null when the window is older than the plan's history), window_end (the day after its last day at 00:00 UTC, or now), uptime_percentage, downtime_seconds, observed_seconds, incident_count and days (oldest first: date, uptime_percentage, downtime_seconds, observed_seconds; days before the creation are not listed). A range entirely older than the plan's history (get_plan_usage shows history_retention_days) returns window_start null, no days, null uptime_percentage and zero counters. For the outages themselves use list_incidents with heartbeat_id; for the heartbeat's state get_heartbeat; probed monitors use get_uptime_summary.",
|
|
4908
|
+
"scope": "read",
|
|
4909
|
+
"input_schema": {
|
|
4910
|
+
"type": "object",
|
|
4911
|
+
"properties": {
|
|
4912
|
+
"heartbeat_id": {
|
|
4913
|
+
"format": "uuid",
|
|
4914
|
+
"type": "string",
|
|
4915
|
+
"description": "The heartbeat's uuid from list_heartbeats. An id that is not a heartbeat of this organization, or a deleted one, is a 404."
|
|
4916
|
+
},
|
|
4917
|
+
"days": {
|
|
4918
|
+
"maximum": 365,
|
|
4919
|
+
"minimum": 1,
|
|
4920
|
+
"type": "integer",
|
|
4921
|
+
"description": "How many days to cover, 1 to 365, ending today; default 30, cut to the plan's history. Not together with from or to."
|
|
4922
|
+
},
|
|
4923
|
+
"from": {
|
|
4924
|
+
"format": "date",
|
|
4925
|
+
"type": "string",
|
|
4926
|
+
"description": "First UTC date of a calendar range, YYYY-MM-DD, inclusive. The range is cut to the plan's history; a range entirely older than it returns no data."
|
|
4927
|
+
},
|
|
4928
|
+
"to": {
|
|
4929
|
+
"format": "date",
|
|
4930
|
+
"type": "string",
|
|
4931
|
+
"description": "Last UTC date of a calendar range, YYYY-MM-DD, inclusive; needs from. Without it, or after today, the range ends today."
|
|
4932
|
+
}
|
|
4933
|
+
},
|
|
4934
|
+
"required": [
|
|
4935
|
+
"heartbeat_id"
|
|
4936
|
+
],
|
|
4937
|
+
"additionalProperties": false
|
|
4938
|
+
},
|
|
4939
|
+
"operation": {
|
|
4940
|
+
"method": "GET",
|
|
4941
|
+
"path": "/v1/heartbeats/{heartbeat_id}/uptime",
|
|
4942
|
+
"path_params": [
|
|
4943
|
+
"heartbeat_id"
|
|
4944
|
+
],
|
|
4945
|
+
"query": [
|
|
4946
|
+
"days",
|
|
4947
|
+
"from",
|
|
4948
|
+
"to"
|
|
4949
|
+
],
|
|
4950
|
+
"body": false,
|
|
4951
|
+
"fixed_query": {}
|
|
4952
|
+
},
|
|
4953
|
+
"annotations": {
|
|
4954
|
+
"read_only_hint": true,
|
|
4955
|
+
"destructive_hint": false,
|
|
4956
|
+
"idempotent_hint": true,
|
|
4957
|
+
"open_world_hint": false
|
|
4958
|
+
},
|
|
4959
|
+
"output_schema": {
|
|
4960
|
+
"properties": {
|
|
4961
|
+
"heartbeat_id": {
|
|
4962
|
+
"format": "uuid",
|
|
4963
|
+
"type": "string"
|
|
4964
|
+
},
|
|
4965
|
+
"window_start": {
|
|
4966
|
+
"anyOf": [
|
|
4967
|
+
{
|
|
4968
|
+
"type": "string"
|
|
4969
|
+
},
|
|
4970
|
+
{
|
|
4971
|
+
"type": "null"
|
|
4972
|
+
}
|
|
4973
|
+
],
|
|
4974
|
+
"description": "Start of the window: its first day at 00:00 UTC, or the heartbeat's creation if that is later. Equal to window_end, with no days, when the window ended before the creation. Null when the window is older than the plan's history."
|
|
4975
|
+
},
|
|
4976
|
+
"window_end": {
|
|
4977
|
+
"description": "End of the window: the day after its last day at 00:00 UTC, or now.",
|
|
4978
|
+
"type": "string"
|
|
4979
|
+
},
|
|
4980
|
+
"uptime_percentage": {
|
|
4981
|
+
"anyOf": [
|
|
4982
|
+
{
|
|
4983
|
+
"type": "number"
|
|
4984
|
+
},
|
|
4985
|
+
{
|
|
4986
|
+
"type": "null"
|
|
4987
|
+
}
|
|
4988
|
+
]
|
|
4989
|
+
},
|
|
4990
|
+
"downtime_seconds": {
|
|
4991
|
+
"description": "Seconds an incident of the heartbeat was open in the window.",
|
|
4992
|
+
"type": "integer"
|
|
4993
|
+
},
|
|
4994
|
+
"observed_seconds": {
|
|
4995
|
+
"description": "Seconds of the window the heartbeat existed; uptime is measured over this time. Never less than downtime_seconds.",
|
|
4996
|
+
"type": "integer"
|
|
4997
|
+
},
|
|
4998
|
+
"incident_count": {
|
|
4999
|
+
"description": "Incidents of the heartbeat that were open in the window.",
|
|
5000
|
+
"type": "integer"
|
|
5001
|
+
},
|
|
5002
|
+
"days": {
|
|
5003
|
+
"items": {
|
|
5004
|
+
"properties": {
|
|
5005
|
+
"date": {
|
|
5006
|
+
"type": "string"
|
|
5007
|
+
},
|
|
5008
|
+
"uptime_percentage": {
|
|
5009
|
+
"anyOf": [
|
|
5010
|
+
{
|
|
5011
|
+
"type": "number"
|
|
5012
|
+
},
|
|
5013
|
+
{
|
|
5014
|
+
"type": "null"
|
|
5015
|
+
}
|
|
5016
|
+
]
|
|
5017
|
+
},
|
|
5018
|
+
"downtime_seconds": {
|
|
5019
|
+
"description": "Seconds of the day an incident of the heartbeat was open.",
|
|
5020
|
+
"type": "integer"
|
|
5021
|
+
},
|
|
5022
|
+
"observed_seconds": {
|
|
5023
|
+
"description": "Seconds of the day the heartbeat existed; uptime is measured over this time. Never less than downtime_seconds.",
|
|
5024
|
+
"type": "integer"
|
|
5025
|
+
}
|
|
5026
|
+
},
|
|
5027
|
+
"required": [
|
|
5028
|
+
"date",
|
|
5029
|
+
"uptime_percentage",
|
|
5030
|
+
"downtime_seconds",
|
|
5031
|
+
"observed_seconds"
|
|
5032
|
+
],
|
|
5033
|
+
"type": "object"
|
|
5034
|
+
},
|
|
5035
|
+
"type": "array"
|
|
5036
|
+
}
|
|
5037
|
+
},
|
|
5038
|
+
"required": [
|
|
5039
|
+
"heartbeat_id",
|
|
5040
|
+
"window_start",
|
|
5041
|
+
"window_end",
|
|
5042
|
+
"uptime_percentage",
|
|
5043
|
+
"downtime_seconds",
|
|
5044
|
+
"observed_seconds",
|
|
5045
|
+
"incident_count",
|
|
5046
|
+
"days"
|
|
5047
|
+
],
|
|
5048
|
+
"type": "object"
|
|
5049
|
+
}
|
|
5050
|
+
},
|
|
4842
5051
|
{
|
|
4843
5052
|
"name": "update_heartbeat",
|
|
4844
5053
|
"title": "Update a heartbeat monitor",
|
|
@@ -6397,7 +6606,7 @@
|
|
|
6397
6606
|
"maximum": 365,
|
|
6398
6607
|
"minimum": 1,
|
|
6399
6608
|
"type": "integer",
|
|
6400
|
-
"description": "Keep results of the last N days,
|
|
6609
|
+
"description": "Keep results of the last N days. Raw check results are kept for about 3 days, so a larger value returns the same rows as 3. For longer periods use get_uptime_daily (uptime per day) and list_incidents (outages)."
|
|
6401
6610
|
}
|
|
6402
6611
|
},
|
|
6403
6612
|
"required": [
|
|
@@ -6774,7 +6983,7 @@
|
|
|
6774
6983
|
{
|
|
6775
6984
|
"name": "get_response_time_by_region",
|
|
6776
6985
|
"title": "Get a monitor's response time by region",
|
|
6777
|
-
"description": "Chart one monitor's average response time over time, one series per region, to see where it is slow and since when. Returns monitor_id, window, bucket_seconds, regions and slowdown. Each region has region, display_name, points (oldest first, the same buckets in every series: bucket_start, avg_response_time_ms, null when the bucket had no successful check, and sample_count) and percentiles over the whole window (p50_response_time_ms, p95_response_time_ms, p99_response_time_ms and sample_count; interpolated from histograms, so usually within about 5% of the exact value and 15% or more on a sparse tail; p95 is null under 20 checks, p99 under 100). Every configured region has a series, even an empty one, followed by removed regions that still had checks; points start at the window's start or at the monitor's creation. slowdown compares each configured region's last window_minutes with its own median of the past week, whatever window you asked for: scope is none, one_region, some_regions or all_regions, and regions lists region, display_name, state (slow, elevated, normal or unknown), recent_p50_response_time_ms and baseline_p50_response_time_ms. slowdown is null when fewer than two regions can be compared. For uptime use get_uptime_summary; for single checks use list_check_results.",
|
|
6986
|
+
"description": "Chart one monitor's average response time over time, one series per region, to see where it is slow and since when. Returns monitor_id, window, bucket_seconds, regions and slowdown. Each region has region, display_name, points (oldest first, the same buckets in every series: bucket_start, avg_response_time_ms, null when the bucket had no successful check, and sample_count) and percentiles over the whole window (p50_response_time_ms, p95_response_time_ms, p99_response_time_ms and sample_count; interpolated from histograms, so usually within about 5% of the exact value and 15% or more on a sparse tail; p95 is null under 20 checks, p99 under 100). Every configured region has a series, even an empty one, followed by removed regions that still had checks; points start at the window's start or at the monitor's creation. slowdown compares each configured region's last window_minutes with its own median of the past week, whatever window you asked for, unless that window is longer than the plan's history (below): scope is none, one_region, some_regions or all_regions, and regions lists region, display_name, state (slow, elevated, normal or unknown), recent_p50_response_time_ms and baseline_p50_response_time_ms. slowdown is null when fewer than two regions can be compared. A window longer than the plan's history (get_plan_usage shows history_retention_days) returns points without data, null percentiles and slowdown null. For uptime use get_uptime_summary; for single checks use list_check_results. With from (and optionally to) the series covers those UTC days instead: window is custom, the points are hourly for one day, six-hourly for two to seven days and daily beyond, and slowdown is null; a range entirely older than the plan's history has points without data and null percentiles.",
|
|
6778
6987
|
"scope": "read",
|
|
6779
6988
|
"input_schema": {
|
|
6780
6989
|
"type": "object",
|
|
@@ -6788,10 +6997,23 @@
|
|
|
6788
6997
|
"enum": [
|
|
6789
6998
|
"24h",
|
|
6790
6999
|
"7d",
|
|
6791
|
-
"30d"
|
|
7000
|
+
"30d",
|
|
7001
|
+
"90d",
|
|
7002
|
+
"180d",
|
|
7003
|
+
"365d"
|
|
6792
7004
|
],
|
|
6793
7005
|
"type": "string",
|
|
6794
|
-
"description": "24h (the default; up to 24 hourly buckets), 7d (up to 28 six-hourly buckets) or
|
|
7006
|
+
"description": "24h (the default; up to 24 hourly buckets), 7d (up to 28 six-hourly buckets), 30d, 90d, 180d or 365d (one bucket per day). A window longer than the plan's history returns no data; get_plan_usage shows the plan's history days. Not together with from or to."
|
|
7007
|
+
},
|
|
7008
|
+
"from": {
|
|
7009
|
+
"format": "date",
|
|
7010
|
+
"type": "string",
|
|
7011
|
+
"description": "First UTC date of a calendar range, YYYY-MM-DD, inclusive. The range is cut to the plan's history; a range entirely older than it returns no data."
|
|
7012
|
+
},
|
|
7013
|
+
"to": {
|
|
7014
|
+
"format": "date",
|
|
7015
|
+
"type": "string",
|
|
7016
|
+
"description": "Last UTC date of a calendar range, YYYY-MM-DD, inclusive; needs from. Without it, or after today, the range ends today."
|
|
6795
7017
|
}
|
|
6796
7018
|
},
|
|
6797
7019
|
"required": [
|
|
@@ -6806,7 +7028,9 @@
|
|
|
6806
7028
|
"monitor_id"
|
|
6807
7029
|
],
|
|
6808
7030
|
"query": [
|
|
6809
|
-
"window"
|
|
7031
|
+
"window",
|
|
7032
|
+
"from",
|
|
7033
|
+
"to"
|
|
6810
7034
|
],
|
|
6811
7035
|
"body": false,
|
|
6812
7036
|
"fixed_query": {}
|
|
@@ -7003,7 +7227,7 @@
|
|
|
7003
7227
|
{
|
|
7004
7228
|
"name": "get_uptime_daily",
|
|
7005
7229
|
"title": "Get a monitor's daily uptime",
|
|
7006
|
-
"description": "Report one monitor's uptime for each UTC day, oldest first and ending today, to find the day an outage or degradation began. Each day has date, uptime_percentage, downtime_seconds, observed_seconds, degraded_seconds, total_checks, up_checks, down_checks, degraded_checks and maintenance_checks. degraded_seconds is the day's time in confirmed DEGRADED status (an ongoing degradation counts up to now; 0
|
|
7230
|
+
"description": "Report one monitor's uptime for each UTC day, oldest first and ending today, to find the day an outage or degradation began. Each day has date, uptime_percentage, downtime_seconds, observed_seconds, degraded_seconds, total_checks, up_checks, down_checks, degraded_checks and maintenance_checks. degraded_seconds is the day's time in confirmed DEGRADED status (an ongoing degradation counts up to now; 0 on days with no degraded time); it does not lower uptime_percentage. A day with degraded_seconds above 0 and no confirmed outage is a degraded (yellow) day in the dashboard; degraded_checks alone does not make one. uptime_percentage is the share of the day's observed time outside confirmed outages (an outage counts from the first failing probe to the first probe that is not DOWN; a failure only one region saw does not count; maintenance counts as up; hours with no checks are left out); a day with no checks and no outage has a null uptime_percentage, not 100. The check counts are informational: a failed check outside a confirmed outage does not lower uptime_percentage. For 24h, 7d and 30d totals, or one total over a date range (from and to), use get_uptime_summary. For the uptime of a whole period, add up its days: 1 − sum(downtime_seconds) / sum(observed_seconds). days goes up to the plan's history (at most 365); a larger value is clamped. With from (and optionally to) every UTC day of that range is returned instead, cut to the plan's history; a range entirely older than it returns days as an empty list. Returns monitor_id and days.",
|
|
7007
7231
|
"scope": "read",
|
|
7008
7232
|
"input_schema": {
|
|
7009
7233
|
"type": "object",
|
|
@@ -7017,7 +7241,17 @@
|
|
|
7017
7241
|
"maximum": 365,
|
|
7018
7242
|
"minimum": 1,
|
|
7019
7243
|
"type": "integer",
|
|
7020
|
-
"description": "How many days to return, 1 to 365; default 30. Capped at the plan's limits.history_retention_days (get_plan_usage), so fewer days can come back."
|
|
7244
|
+
"description": "How many days to return, 1 to 365; default 30. Capped at the plan's limits.history_retention_days (get_plan_usage), so fewer days can come back. Not together with from or to."
|
|
7245
|
+
},
|
|
7246
|
+
"from": {
|
|
7247
|
+
"format": "date",
|
|
7248
|
+
"type": "string",
|
|
7249
|
+
"description": "First UTC date of a calendar range, YYYY-MM-DD, inclusive. The range is cut to the plan's history; a range entirely older than it returns no data."
|
|
7250
|
+
},
|
|
7251
|
+
"to": {
|
|
7252
|
+
"format": "date",
|
|
7253
|
+
"type": "string",
|
|
7254
|
+
"description": "Last UTC date of a calendar range, YYYY-MM-DD, inclusive; needs from. Without it, or after today, the range ends today."
|
|
7021
7255
|
}
|
|
7022
7256
|
},
|
|
7023
7257
|
"required": [
|
|
@@ -7032,7 +7266,9 @@
|
|
|
7032
7266
|
"monitor_id"
|
|
7033
7267
|
],
|
|
7034
7268
|
"query": [
|
|
7035
|
-
"days"
|
|
7269
|
+
"days",
|
|
7270
|
+
"from",
|
|
7271
|
+
"to"
|
|
7036
7272
|
],
|
|
7037
7273
|
"body": false,
|
|
7038
7274
|
"fixed_query": {}
|
|
@@ -7089,7 +7325,7 @@
|
|
|
7089
7325
|
"type": "integer"
|
|
7090
7326
|
},
|
|
7091
7327
|
"degraded_seconds": {
|
|
7092
|
-
"description": "Seconds of this UTC day the monitor spent in confirmed DEGRADED status (from the monitor's status history; an ongoing degradation counts up to now). Maintenance is not subtracted. Zero
|
|
7328
|
+
"description": "Seconds of this UTC day the monitor spent in confirmed DEGRADED status (from the monitor's status history; an ongoing degradation counts up to now). Maintenance is not subtracted. Zero on days with no degraded time.",
|
|
7093
7329
|
"type": "integer"
|
|
7094
7330
|
}
|
|
7095
7331
|
},
|
package/dist/config.js
CHANGED
|
@@ -64,8 +64,8 @@ function readTimeout(raw) {
|
|
|
64
64
|
export function loadConfig(env = process.env) {
|
|
65
65
|
const apiKey = env.FETTLE_API_KEY?.trim();
|
|
66
66
|
if (apiKey === undefined || apiKey === "") {
|
|
67
|
-
throw new ConfigError("FETTLE_API_KEY is not set. Create an API key
|
|
68
|
-
"https://fettle.sh and add it to the fettle-mcp entry of your MCP " +
|
|
67
|
+
throw new ConfigError("FETTLE_API_KEY is not set. Create an API key under API keys in the dashboard " +
|
|
68
|
+
"sidebar (https://dashboard.fettle.sh/api-keys) and add it to the fettle-mcp entry of your MCP " +
|
|
69
69
|
'client configuration, e.g. "env": { "FETTLE_API_KEY": "fettle_…" }.');
|
|
70
70
|
}
|
|
71
71
|
return {
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,mEAAmE;AACnE,MAAM,CAAC,MAAM,eAAe,GAAG,uBAAuB,CAAC;AAEvD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAQzC,MAAM,OAAO,WAAY,SAAQ,KAAK;CAAG;AAEzC,SAAS,UAAU,CAAC,GAAuB;IACzC,IAAI,GAAG,KAAK,SAAS,IAAI,GA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C,GAAuB;IAC1C,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QAC3C,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;IAC/C,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,MAAM,IAAI,CAAC,EAAE,CAAC;QAC5C,MAAM,IAAI,WAAW,CACnB,qEAAqE;YACnE,OAAO,GAAG,2BAA2B,kBAAkB,GAAG,CAC7D,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,MAAyB,OAAO,CAAC,GAAG;IAC7D,MAAM,MAAM,GAAG,GAAG,CAAC,cAAc,EAAE,IAAI,EAAE,CAAC;IAC1C,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,EAAE,EAAE,CAAC;QAC1C,MAAM,IAAI,WAAW,CACnB,+EAA+E;YAC7E,gGAAgG;YAChG,qEAAqE,CACxE,CAAC;IACJ,CAAC;IACD,OAAO;QACL,MAAM;QACN,MAAM,EAAE,UAAU,CAAC,GAAG,CAAC,cAAc,CAAC;QACtC,SAAS,EAAE,WAAW,CAAC,GAAG,CAAC,iBAAiB,CAAC;KAC9C,CAAC;AACJ,CAAC"}
|
package/dist/contract.d.ts
CHANGED
|
@@ -22,6 +22,20 @@ export interface ToolOperation {
|
|
|
22
22
|
* monitor list (`view=compact`) without a second route.
|
|
23
23
|
*/
|
|
24
24
|
fixed_query: Record<string, string>;
|
|
25
|
+
/**
|
|
26
|
+
* Query parameters sent with this value unless the caller passed any name
|
|
27
|
+
* listed in `default_query_unless` (a query parameter with a value, or a
|
|
28
|
+
* `local_flags` flag set to true). A flag passed as false counts as not
|
|
29
|
+
* passed. Core uses this to give `list_incidents` a 30-day default.
|
|
30
|
+
*/
|
|
31
|
+
default_query: Record<string, string>;
|
|
32
|
+
default_query_unless: string[];
|
|
33
|
+
/**
|
|
34
|
+
* Boolean arguments of the input schema that the executor reads and never
|
|
35
|
+
* sends to the API (`all_time`). A true flag together with a query
|
|
36
|
+
* parameter named in `default_query_unless` is an invalid call.
|
|
37
|
+
*/
|
|
38
|
+
local_flags: string[];
|
|
25
39
|
body: boolean;
|
|
26
40
|
}
|
|
27
41
|
/**
|
package/dist/contract.js
CHANGED
|
@@ -30,21 +30,30 @@ const METHODS = new Set(["GET", "POST", "PATCH", "DELETE"]);
|
|
|
30
30
|
function fail(message) {
|
|
31
31
|
throw new Error(`Invalid tool contract: ${message}`);
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
// Absent is the common case: only tools that pin a parameter
|
|
35
|
-
//
|
|
33
|
+
function assertStringMap(value, toolName, field) {
|
|
34
|
+
// Absent is the common case: only tools that pin or default a parameter
|
|
35
|
+
// carry these fields, and older contracts carry them nowhere.
|
|
36
36
|
if (value === undefined) {
|
|
37
37
|
return {};
|
|
38
38
|
}
|
|
39
39
|
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
40
|
-
fail(`tool '${toolName}' has a malformed
|
|
40
|
+
fail(`tool '${toolName}' has a malformed ${field}.`);
|
|
41
41
|
}
|
|
42
42
|
const entries = Object.entries(value);
|
|
43
43
|
if (entries.some(([, item]) => typeof item !== "string")) {
|
|
44
|
-
fail(`tool '${toolName}' has a malformed
|
|
44
|
+
fail(`tool '${toolName}' has a malformed ${field}.`);
|
|
45
45
|
}
|
|
46
46
|
return Object.fromEntries(entries);
|
|
47
47
|
}
|
|
48
|
+
function assertStringList(value, toolName, field) {
|
|
49
|
+
if (value === undefined) {
|
|
50
|
+
return [];
|
|
51
|
+
}
|
|
52
|
+
if (!Array.isArray(value) || value.some((item) => typeof item !== "string")) {
|
|
53
|
+
fail(`tool '${toolName}' has a malformed ${field}.`);
|
|
54
|
+
}
|
|
55
|
+
return value;
|
|
56
|
+
}
|
|
48
57
|
function assertOperation(operation, toolName) {
|
|
49
58
|
if (typeof operation !== "object" || operation === null) {
|
|
50
59
|
fail(`tool '${toolName}' has no operation object.`);
|
|
@@ -66,7 +75,10 @@ function assertOperation(operation, toolName) {
|
|
|
66
75
|
path: candidate.path,
|
|
67
76
|
path_params: pathParams.map(String),
|
|
68
77
|
query: query.map(String),
|
|
69
|
-
fixed_query:
|
|
78
|
+
fixed_query: assertStringMap(candidate.fixed_query, toolName, "fixed_query"),
|
|
79
|
+
default_query: assertStringMap(candidate.default_query, toolName, "default_query"),
|
|
80
|
+
default_query_unless: assertStringList(candidate.default_query_unless, toolName, "default_query_unless"),
|
|
81
|
+
local_flags: assertStringList(candidate.local_flags, toolName, "local_flags"),
|
|
70
82
|
body: candidate.body === true,
|
|
71
83
|
};
|
|
72
84
|
}
|
package/dist/contract.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AA0EvC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC;AAE5C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,6BAA6B,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEpF,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;AAE5D,SAAS,IAAI,CAAC,OAAe;IAC3B,MAAM,IA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ACD,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,CAAC,YAAY,EAAE,CAAC;AACnF,CAAC;AAED,+CAA+C;AAC/C,MAAM,UAAU,YAAY,CAAC,MAAW,YAAY;IAClD,OAAO,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;AAC9D,CAAC;AAED,iFAAiF;AACjF,MAAM,UAAU,QAAQ,CAAC,QAAsB,EAAE,IAAY;IAC3D,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AAC3D,CAAC"}
|
package/dist/errors.js
CHANGED
|
@@ -100,14 +100,15 @@ export function describeFailure(statusCode, body, headers = null) {
|
|
|
100
100
|
if (statusCode === 401) {
|
|
101
101
|
return ("Authentication failed: Fettle rejected the API key. Check that " +
|
|
102
102
|
"FETTLE_API_KEY in the MCP client configuration holds a current, " +
|
|
103
|
-
"un-revoked key from
|
|
103
|
+
"un-revoked key from API keys in the dashboard sidebar " +
|
|
104
|
+
"(https://dashboard.fettle.sh/api-keys), then " +
|
|
104
105
|
"restart the MCP client so it picks the new value up.");
|
|
105
106
|
}
|
|
106
107
|
if (statusCode === 403) {
|
|
107
108
|
if (message.includes(SCOPE_INSUFFICIENT_MESSAGE)) {
|
|
108
109
|
return ("This tool requires an API key with write scope; FETTLE_API_KEY holds a " +
|
|
109
|
-
"read-only key. Create a write-scoped key
|
|
110
|
-
"https://fettle.sh and restart the MCP client with it.");
|
|
110
|
+
"read-only key. Create a write-scoped key under API keys in the dashboard " +
|
|
111
|
+
"sidebar (https://dashboard.fettle.sh/api-keys) and restart the MCP client with it.");
|
|
111
112
|
}
|
|
112
113
|
return `Forbidden: ${trimSentenceEnd(message) || "the API key is not permitted to perform this action"}.`;
|
|
113
114
|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C,CAAC;IACJ,CAAC;IAED,IAAI,UAAU,KAAK,GAAG,EAAE,CAAC;QACvB,MAAM,UAAU,GAAG,iBAAiB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACpD,IAAI,UAAU,KAAK,IAAI,EAAE,CAAC;YACxB,OAAO,CACL,2DAA2D,UAAU,GAAG;gBACxE,UAAU,CACX,CAAC;QACJ,CAAC;QACD,OAAO,+DAA+D,CAAC;IACzE,CAAC;IAED,OAAO,CACL,8BAA8B,UAAU,IAAI;QAC5C,GAAG,eAAe,CAAC,OAAO,CAAC,IAAI,gCAAgC,GAAG,CACnE,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,wBAAwB,CAAC,OAAe,EAAE,KAAc;IACtE,MAAM,MAAM,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACtE,OAAO,CACL,qCAAqC,OAAO,KAAK,MAAM,kBAAkB;QACzE,8DAA8D;QAC9D,wDAAwD,CACzD,CAAC;AACJ,CAAC"}
|
package/dist/executor.d.ts
CHANGED
|
@@ -64,8 +64,12 @@ export declare class ToolExecutor {
|
|
|
64
64
|
* 1. Substitute the operation's declared path parameters into the URL
|
|
65
65
|
* template, percent-encoding each value so it cannot introduce extra path
|
|
66
66
|
* segments or a query string of its own.
|
|
67
|
-
* 2.
|
|
68
|
-
*
|
|
67
|
+
* 2. Read the operation's local flags and drop them (they steer the request
|
|
68
|
+
* and are never sent), then route the declared query parameters into the
|
|
69
|
+
* query string. `default_query` is added unless a `default_query_unless`
|
|
70
|
+
* parameter was passed or a flag of that name is true; a true flag
|
|
71
|
+
* together with such a parameter is refused. Then the operation's pinned
|
|
72
|
+
* `fixed_query` pairs, which override any same name.
|
|
69
73
|
* 3. Route whatever arguments remain into the JSON body when the operation
|
|
70
74
|
* declares one; otherwise an argument that matched no declared parameter
|
|
71
75
|
* is rejected rather than silently dropped.
|
package/dist/executor.js
CHANGED
|
@@ -68,8 +68,45 @@ function substitutePathParams(tool, args) {
|
|
|
68
68
|
}
|
|
69
69
|
return path;
|
|
70
70
|
}
|
|
71
|
+
/** The Python type name core's executor prints for a JSON value. */
|
|
72
|
+
function pythonTypeName(value) {
|
|
73
|
+
if (typeof value === "string") {
|
|
74
|
+
return "str";
|
|
75
|
+
}
|
|
76
|
+
if (typeof value === "number") {
|
|
77
|
+
return Number.isInteger(value) ? "int" : "float";
|
|
78
|
+
}
|
|
79
|
+
if (typeof value === "boolean") {
|
|
80
|
+
return "bool";
|
|
81
|
+
}
|
|
82
|
+
if (Array.isArray(value)) {
|
|
83
|
+
return "list";
|
|
84
|
+
}
|
|
85
|
+
return "dict";
|
|
86
|
+
}
|
|
71
87
|
function buildQuery(tool, args) {
|
|
72
88
|
const params = new URLSearchParams();
|
|
89
|
+
// Names of query parameters that received a non-null value, an empty array
|
|
90
|
+
// included: core counts `[]` as passed even though it adds no pair.
|
|
91
|
+
const filled = new Set();
|
|
92
|
+
// Local flags (`all_time`) steer the request but are never sent: read and
|
|
93
|
+
// drop them first, exactly as core's executor does.
|
|
94
|
+
const flags = new Map();
|
|
95
|
+
for (const name of tool.operation.local_flags) {
|
|
96
|
+
if (!(name in args)) {
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
const flag = args[name];
|
|
100
|
+
delete args[name];
|
|
101
|
+
if (flag === undefined || flag === null) {
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
if (typeof flag !== "boolean") {
|
|
105
|
+
throw new ToolArgumentError(`Tool '${tool.name}' argument '${name}' must be true or false; ` +
|
|
106
|
+
`got ${pythonTypeName(flag)}.`);
|
|
107
|
+
}
|
|
108
|
+
flags.set(name, flag);
|
|
109
|
+
}
|
|
73
110
|
for (const name of tool.operation.query) {
|
|
74
111
|
if (!(name in args)) {
|
|
75
112
|
continue;
|
|
@@ -79,6 +116,7 @@ function buildQuery(tool, args) {
|
|
|
79
116
|
if (value === undefined || value === null) {
|
|
80
117
|
continue;
|
|
81
118
|
}
|
|
119
|
+
filled.add(name);
|
|
82
120
|
// Arrays become repeated parameters (`regions=eu®ions=us`), which is
|
|
83
121
|
// how FastAPI reads a list query parameter — a single comma-joined value
|
|
84
122
|
// would arrive as one malformed member.
|
|
@@ -90,6 +128,25 @@ function buildQuery(tool, args) {
|
|
|
90
128
|
}
|
|
91
129
|
params.append(name, String(value));
|
|
92
130
|
}
|
|
131
|
+
// A default applies unless the caller passed one of the names that suppress
|
|
132
|
+
// it. A flag set to true contradicts a suppressing parameter (all_time with
|
|
133
|
+
// period_days) and is refused; false counts as not passed.
|
|
134
|
+
const unless = tool.operation.default_query_unless;
|
|
135
|
+
const passed = unless.filter((name) => filled.has(name));
|
|
136
|
+
for (const name of unless) {
|
|
137
|
+
if (flags.get(name) === true && passed.length > 0) {
|
|
138
|
+
throw new ToolArgumentError(`Tool '${tool.name}' argument '${name}' cannot be combined with ` +
|
|
139
|
+
`${passed.join(", ")}.`);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
const suppressed = passed.length > 0 || unless.some((name) => flags.get(name) === true);
|
|
143
|
+
if (!suppressed) {
|
|
144
|
+
for (const [name, value] of Object.entries(tool.operation.default_query)) {
|
|
145
|
+
if (!filled.has(name)) {
|
|
146
|
+
params.set(name, value);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
93
150
|
// Pinned parameters go last and with `set`, so they replace anything of the
|
|
94
151
|
// same name: the contract pins them precisely so the model cannot choose a
|
|
95
152
|
// different value (core gives agents the compact monitor list this way).
|
|
@@ -127,8 +184,12 @@ export class ToolExecutor {
|
|
|
127
184
|
* 1. Substitute the operation's declared path parameters into the URL
|
|
128
185
|
* template, percent-encoding each value so it cannot introduce extra path
|
|
129
186
|
* segments or a query string of its own.
|
|
130
|
-
* 2.
|
|
131
|
-
*
|
|
187
|
+
* 2. Read the operation's local flags and drop them (they steer the request
|
|
188
|
+
* and are never sent), then route the declared query parameters into the
|
|
189
|
+
* query string. `default_query` is added unless a `default_query_unless`
|
|
190
|
+
* parameter was passed or a flag of that name is true; a true flag
|
|
191
|
+
* together with such a parameter is refused. Then the operation's pinned
|
|
192
|
+
* `fixed_query` pairs, which override any same name.
|
|
132
193
|
* 3. Route whatever arguments remain into the JSON body when the operation
|
|
133
194
|
* declares one; otherwise an argument that matched no declared parameter
|
|
134
195
|
* is rejected rather than silently dropped.
|
package/dist/executor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../src/executor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAexE;;;;GAIG;AACH,MAAM,OAAO,iBAAkB,SAAQ,KAAK;CAAG;AAE/C;;;;GAIG;AACH,MAAM,OAAO,iBAAkB,SAAQ,KAAK;CAAG;AAE/C;;;GAGG;AACH,MAAM,sBAAsB,GAAG,GAAG,CAAC;AAWnC,SAAS,oBAAoB,CAAC,IAAe,EAAE,IAA6B;IAC1E,IAAI,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;IAC/B,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;QAC9C,IAAI,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,EAAE,CAAC;YACpB,MAAM,IAAI,iBAAiB,CAAC,SAAS,IAAI,CAAC,IAAI,wBAAwB,IAAI,IAAI,CAAC,CAAC;QAClF,CAAC;QACD,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;QACvB,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC;QAClB,0EAA0E;QAC1E,wEAAwE;QACxE,IACE,OAAO,GAAG,KAAK,SAAS;YACxB,CAAC,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,GAAG,KAAK,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AI,EAAE,MAAM;wBACZ,IAAI,EAAE,eAAe,CAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC;qBACpE;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;QAED,MAAM,IAAI,GACR,OAAO,KAAK,SAAS;YACnB,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,eAAe,QAAQ,CAAC,MAAM,8BAA8B;YAC1E,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAC9B,MAAM,MAAM,GAAe,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;QACjF,oEAAoE;QACpE,iEAAiE;QACjE,IACE,IAAI,CAAC,aAAa,KAAK,SAAS;YAChC,OAAO,OAAO,KAAK,QAAQ;YAC3B,OAAO,KAAK,IAAI;YAChB,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EACvB,CAAC;YACD,MAAM,CAAC,iBAAiB,GAAG,OAAO,CAAC;QACrC,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
|
package/dist/server.js
CHANGED
|
@@ -70,7 +70,7 @@ export function createServer(contract, executor, identity) {
|
|
|
70
70
|
if (tool === undefined) {
|
|
71
71
|
throw new McpError(ErrorCode.InvalidParams, `Unknown tool '${name}'.`);
|
|
72
72
|
}
|
|
73
|
-
const args = (rawArguments ?? {});
|
|
73
|
+
const args = dropSkippedNulls(tool, (rawArguments ?? {}));
|
|
74
74
|
const validate = validators.get(name);
|
|
75
75
|
if (validate !== undefined && !validate(args)) {
|
|
76
76
|
return {
|
|
@@ -95,4 +95,14 @@ export function createServer(contract, executor, identity) {
|
|
|
95
95
|
});
|
|
96
96
|
return server;
|
|
97
97
|
}
|
|
98
|
+
/**
|
|
99
|
+
* Drop the top-level null arguments that core's executor skips (query
|
|
100
|
+
* parameters and local flags) before schema validation, so a null means "not
|
|
101
|
+
* passed" and the default applies. Path parameters and body fields are left
|
|
102
|
+
* alone: core refuses a null path value and forwards a null body field.
|
|
103
|
+
*/
|
|
104
|
+
function dropSkippedNulls(tool, args) {
|
|
105
|
+
const skipped = new Set([...tool.operation.query, ...tool.operation.local_flags]);
|
|
106
|
+
return Object.fromEntries(Object.entries(args).filter(([name, value]) => !(value === null && skipped.has(name))));
|
|
107
|
+
}
|
|
98
108
|
//# sourceMappingURL=server.js.map
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EACL,qBAAqB,EAErB,SAAS,EACT,sBAAsB,EACtB,QAAQ,GAET,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EACL,qBAAqB,EAErB,SAAS,EACT,sBAAsB,EACtB,QAAQ,GAET,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,QAAQ,EAAqC,MAAM,eAAe,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAqB,MAAM,eAAe,CAAC;AACxF,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAO1E;;;;;;;;;GASG;AACH,SAAS,WAAW,CAAC,QAAsB;IACzC,OAAO,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACjC,MAAM,IAAI,GAAS;YACjB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,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,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC,CACF,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;GAKG;AACH,SAAS,gBAAgB,CACvB,IAAe,EACf,IAA6B;IAE7B,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC;IAClF,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,CACzB,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAC1D,CACF,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fettle-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"mcpName": "sh.fettle/mcp",
|
|
5
5
|
"description": "Fettle uptime monitoring (https://fettle.sh) for any MCP client — manage monitors, incidents, heartbeats, maintenance windows, status page incidents and deploy checks from Claude, Cursor or Codex.",
|
|
6
6
|
"keywords": [
|