fettle-mcp 1.6.0 → 1.8.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 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 (Settings → API Keys at https://fettle.sh)
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
@@ -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 or 30d with percentiles, plus the current slowdown. |
153
- | `list_check_results` | read | Individual check results of a monitor, newest first, filtered by region, status or period. |
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, up to a year within the plan's history. |
152
+ | `get_response_time_by_region` | read | Per-region response time over 24h, 7d, 30d, 90d, 180d or 365d, plus the current slowdown. |
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; newest first or open unacknowledged first. |
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, 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
 
@@ -281,7 +281,7 @@ ERRORS (in a failed call's text)
281
281
  - "Invalid argument(s)" or "Invalid request:": fix what it names, retry.
282
282
  - "Forbidden:": a plan limit, an unknown region, or the user's role; the reason says which.
283
283
  - "Not found:": no such id in this organization.
284
- - "Rate limited": wait the seconds given. All API keys and app connections share the organization's per-minute budget.
284
+ - "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.
285
285
  - "the API returned 5xx": retry once later.
286
286
  - "does not accept argument(s)": drop the ones named.
287
287
  - "Request failed with status N": read the reason; do not retry unchanged.
@@ -367,7 +367,8 @@ configuration. This package authenticates with an API key only.
367
367
  ## Rate limits and plans
368
368
 
369
369
  Tool calls spend the same per-organization request budget as the REST API — the
370
- plan's limit, not a separate one. A rate-limited call comes back saying how many
370
+ plan's limit, not a separate one. Every API key and app connection of the
371
+ organization shares it, so one busy integration can use it all. A rate-limited call comes back saying how many
371
372
  seconds to wait. Some tools also have their own cap per calling address:
372
373
  `check_now` 10 calls per minute, `bulk_update_monitor_tags` and
373
374
  `bulk_update_heartbeat_tags` 10 per minute between them,
@@ -384,7 +385,7 @@ variable. Check the `env` block of the config above, then fully restart the
384
385
  client: most clients read MCP config only at launch.
385
386
 
386
387
  **`Authentication failed`** — the key is wrong, revoked, or from a deleted
387
- organization. Create a fresh one in Settings → API Keys.
388
+ organization. Create a fresh one under API keys in the dashboard sidebar.
388
389
 
389
390
  **`This tool requires an API key with write scope`** — the key is read-only. Create
390
391
  a write-scoped key; there is no way to widen an existing key's scope.
@@ -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, status pages, members, API keys and billing live only in the dashboard (https://dashboard.fettle.sh). Read a tool's description before its first call.\n\nFINDING THINGS\nlist_monitors gives one short row per monitor, to find ids. Broken now: status [\"DOWN\", \"DEGRADED\"]. Certificates expiring first: type [\"SSL\"], sort \"ssl_expiry\". What changed on targets (DNS answers, certificates), for example 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.\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",
3
+ "instructions": "Fettle is an uptime monitoring service. The tools see only the caller's organization. Channels, status pages, members, API keys and billing live only in the dashboard (https://dashboard.fettle.sh). Read a tool's description before its first call.\n\nFINDING THINGS\nlist_monitors gives one short row per monitor, to find ids. Broken now: status [\"DOWN\", \"DEGRADED\"]. Certificates expiring first: type [\"SSL\"], sort \"ssl_expiry\". What changed on targets (DNS answers, certificates), for example 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.",
3438
3438
  "scope": "read",
3439
3439
  "input_schema": {
3440
3440
  "type": "object",
@@ -3807,7 +3807,17 @@
3807
3807
  "maximum": 365,
3808
3808
  "minimum": 1,
3809
3809
  "type": "integer",
3810
- "description": "Keep incidents active within the last N days, 1 to 365. An open incident always qualifies, so with status open it changes nothing: use status resolved, or omit status, to see the window take effect."
3810
+ "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."
3811
+ },
3812
+ "from": {
3813
+ "format": "date",
3814
+ "type": "string",
3815
+ "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."
3816
+ },
3817
+ "to": {
3818
+ "format": "date",
3819
+ "type": "string",
3820
+ "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
3821
  },
3812
3822
  "sort": {
3813
3823
  "enum": [
@@ -3815,6 +3825,10 @@
3815
3825
  ],
3816
3826
  "type": "string",
3817
3827
  "description": "attention: open unacknowledged first, then open acknowledged, then resolved; newest first within each. Omit it for newest first."
3828
+ },
3829
+ "all_time": {
3830
+ "type": "boolean",
3831
+ "description": "true lists incidents of all time, one page at a time. Not together with period_days, from or to."
3818
3832
  }
3819
3833
  },
3820
3834
  "required": [],
@@ -3831,10 +3845,24 @@
3831
3845
  "status",
3832
3846
  "cause",
3833
3847
  "period_days",
3848
+ "from",
3849
+ "to",
3834
3850
  "sort"
3835
3851
  ],
3836
3852
  "body": false,
3837
- "fixed_query": {}
3853
+ "fixed_query": {},
3854
+ "default_query": {
3855
+ "period_days": "30"
3856
+ },
3857
+ "default_query_unless": [
3858
+ "period_days",
3859
+ "from",
3860
+ "to",
3861
+ "all_time"
3862
+ ],
3863
+ "local_flags": [
3864
+ "all_time"
3865
+ ]
3838
3866
  },
3839
3867
  "annotations": {
3840
3868
  "read_only_hint": true,
@@ -5239,7 +5267,7 @@
5239
5267
  {
5240
5268
  "name": "resume_heartbeat",
5241
5269
  "title": "Resume a heartbeat monitor",
5242
- "description": "Resume one paused heartbeat: it goes back to PENDING with no deadline, so it is not reported late until its next success ping restarts the clock. Use it once the job runs again; to change its timing use update_heartbeat. There is no bulk resume for heartbeats. Requires a key with the write scope. Resuming one that is not paused resets it to PENDING the same way. Returns the heartbeat.",
5270
+ "description": "Resume one paused heartbeat: it goes back to PENDING with no deadline, so it is not reported late until its next success ping restarts the clock. Use it once the job runs again; to change its timing use update_heartbeat. There is no bulk resume for heartbeats. Requires a key with the write scope. Resuming one that is not paused resets it to PENDING the same way. Resuming a paused one is refused (403) when the plan's heartbeat limit is reached. Returns the heartbeat.",
5243
5271
  "scope": "write",
5244
5272
  "input_schema": {
5245
5273
  "type": "object",
@@ -5436,7 +5464,7 @@
5436
5464
  {
5437
5465
  "name": "list_maintenance_windows",
5438
5466
  "title": "List maintenance windows",
5439
- "description": "List every maintenance window of the organization, enabled or not, in effect or not. Each has id, name, enabled, scope (ORG or MONITOR), dtstart, duration_minutes, rrule, timezone, monitor_ids and created_at. Use it to find a window's id. To learn whether alerts are silenced right now use list_active_maintenance; for a window's upcoming occurrences use get_maintenance_window. Returns a page: items plus total, page, size and pages.",
5467
+ "description": "List every maintenance window of the organization, enabled or not, in effect or not. Each has id, name, enabled, scope (ORG or MONITOR), dtstart, duration_minutes, rrule, timezone, monitor_ids, created_at and plan_disabled_at (set when a plan drop switched the window off: it silences nothing). Use it to find a window's id. To learn whether alerts are silenced right now use list_active_maintenance; for a window's upcoming occurrences use get_maintenance_window. Returns a page: items plus total, page, size and pages.",
5440
5468
  "scope": "read",
5441
5469
  "input_schema": {
5442
5470
  "type": "object",
@@ -5535,6 +5563,16 @@
5535
5563
  },
5536
5564
  "created_at": {
5537
5565
  "type": "string"
5566
+ },
5567
+ "plan_disabled_at": {
5568
+ "anyOf": [
5569
+ {
5570
+ "type": "string"
5571
+ },
5572
+ {
5573
+ "type": "null"
5574
+ }
5575
+ ]
5538
5576
  }
5539
5577
  },
5540
5578
  "required": [
@@ -5682,6 +5720,16 @@
5682
5720
  "created_at": {
5683
5721
  "type": "string"
5684
5722
  },
5723
+ "plan_disabled_at": {
5724
+ "anyOf": [
5725
+ {
5726
+ "type": "string"
5727
+ },
5728
+ {
5729
+ "type": "null"
5730
+ }
5731
+ ]
5732
+ },
5685
5733
  "next_occurrences": {
5686
5734
  "items": {
5687
5735
  "properties": {
@@ -5837,6 +5885,16 @@
5837
5885
  },
5838
5886
  "created_at": {
5839
5887
  "type": "string"
5888
+ },
5889
+ "plan_disabled_at": {
5890
+ "anyOf": [
5891
+ {
5892
+ "type": "string"
5893
+ },
5894
+ {
5895
+ "type": "null"
5896
+ }
5897
+ ]
5840
5898
  }
5841
5899
  },
5842
5900
  "required": [
@@ -5856,7 +5914,7 @@
5856
5914
  {
5857
5915
  "name": "update_maintenance_window",
5858
5916
  "title": "Update a maintenance window",
5859
- "description": "Change one maintenance window's name, schedule, scope or monitors, or switch it off with enabled false; only the fields you pass change. While a window is in effect its monitors keep being checked, but no incident opens and no down or change alert goes out; a recovery alert goes out only for an incident whose down alert was already sent before the window began. Certificate and domain warnings still go out. A recurring window cannot become one-time: delete it with delete_maintenance_window and create a new one. Check a new schedule with preview_maintenance_window first. Requires a key with the write scope. An invalid argument is a 422 and a resulting schedule that is invalid (for example a bad rrule) a 406, each with the reason. Returns the window. Example: {\"window_id\": \"<id from list_maintenance_windows>\", \"enabled\": false}",
5917
+ "description": "Change one maintenance window's name, schedule, scope or monitors, or switch it off with enabled false; only the fields you pass change. While a window is in effect its monitors keep being checked, but no incident opens and no down or change alert goes out; a recovery alert goes out only for an incident whose down alert was already sent before the window began. Certificate and domain warnings still go out. A recurring window cannot become one-time: delete it with delete_maintenance_window and create a new one. Check a new schedule with preview_maintenance_window first. Requires a key with the write scope. An invalid argument is a 422 and a resulting schedule that is invalid (for example a bad rrule) a 406, each with the reason. A window with plan_disabled_at set was switched off by a plan drop: any update of it is refused (403) until the plan has room, and a successful one switches it back on. Returns the window. Example: {\"window_id\": \"<id from list_maintenance_windows>\", \"enabled\": false}",
5860
5918
  "scope": "write",
5861
5919
  "input_schema": {
5862
5920
  "type": "object",
@@ -5979,6 +6037,16 @@
5979
6037
  },
5980
6038
  "created_at": {
5981
6039
  "type": "string"
6040
+ },
6041
+ "plan_disabled_at": {
6042
+ "anyOf": [
6043
+ {
6044
+ "type": "string"
6045
+ },
6046
+ {
6047
+ "type": "null"
6048
+ }
6049
+ ]
5982
6050
  }
5983
6051
  },
5984
6052
  "required": [
@@ -6357,7 +6425,7 @@
6357
6425
  "maximum": 365,
6358
6426
  "minimum": 1,
6359
6427
  "type": "integer",
6360
- "description": "Keep results of the last N days, 1 to 365; without it every stored result is eligible."
6428
+ "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)."
6361
6429
  }
6362
6430
  },
6363
6431
  "required": [
@@ -6734,7 +6802,7 @@
6734
6802
  {
6735
6803
  "name": "get_response_time_by_region",
6736
6804
  "title": "Get a monitor's response time by region",
6737
- "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.",
6805
+ "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.",
6738
6806
  "scope": "read",
6739
6807
  "input_schema": {
6740
6808
  "type": "object",
@@ -6748,10 +6816,13 @@
6748
6816
  "enum": [
6749
6817
  "24h",
6750
6818
  "7d",
6751
- "30d"
6819
+ "30d",
6820
+ "90d",
6821
+ "180d",
6822
+ "365d"
6752
6823
  ],
6753
6824
  "type": "string",
6754
- "description": "24h (the default; up to 24 hourly buckets), 7d (up to 28 six-hourly buckets) or 30d (up to 30 daily buckets)."
6825
+ "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."
6755
6826
  }
6756
6827
  },
6757
6828
  "required": [
@@ -6963,7 +7034,7 @@
6963
7034
  {
6964
7035
  "name": "get_uptime_daily",
6965
7036
  "title": "Get a monitor's daily uptime",
6966
- "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 for days before this monitor's status history began, when the status ledger shipped); 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 use get_uptime_summary. Returns monitor_id and days.",
7037
+ "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 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. Returns monitor_id and days.",
6967
7038
  "scope": "read",
6968
7039
  "input_schema": {
6969
7040
  "type": "object",
@@ -7049,7 +7120,7 @@
7049
7120
  "type": "integer"
7050
7121
  },
7051
7122
  "degraded_seconds": {
7052
- "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 for days before this monitor's status history began (when the status ledger shipped).",
7123
+ "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.",
7053
7124
  "type": "integer"
7054
7125
  }
7055
7126
  },
@@ -9613,7 +9684,7 @@
9613
9684
  {
9614
9685
  "name": "list_channels",
9615
9686
  "title": "List notification channels",
9616
- "description": "List the organization's notification channels, to get the ids that channel_ids of monitors and heartbeats take: every member's own email channel, then up to 100 others (added email addresses first). Each has id, type, label, is_verified, is_active, state, member_name (the member whose own email channel it is, else null) and destination_hint (a masked email address, a chat id, or a webhook's scheme and host). state is WORKING, MUTED, PENDING_CONFIRMATION or BROKEN; only a WORKING channel receives alerts. An active channel can be bound in any state; a muted (inactive) or unknown id cannot be newly bound (404). Alerts go only to channels: if none works, the organization's owner is emailed. Channels are added and changed only in the dashboard.",
9687
+ "description": "List the organization's notification channels, to get the ids that channel_ids of monitors and heartbeats take: every member's own email channel, then up to 100 others (added email addresses first). Each has id, type, label, is_verified, is_active, state, member_name (the member whose own email channel it is, else null) and destination_hint (a masked email address, a chat id, or a webhook's scheme and host). state is WORKING, MUTED, PENDING_CONFIRMATION, BROKEN or PLAN_DISABLED (off because of the plan: it receives nothing until it is enabled again in the dashboard); only a WORKING channel receives alerts. An active channel can be bound in any state; a muted (inactive) or unknown id cannot be newly bound (404). Alerts go only to channels: if none works, the organization's owner is emailed. Channels are added and changed only in the dashboard.",
9617
9688
  "scope": "read",
9618
9689
  "input_schema": {
9619
9690
  "type": "object",
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 in Settings → API Keys at " +
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 {
@@ -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,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QAC3C,OAAO,eAAe,CAAC;IACzB,CAAC;IACD,IAAI,MAAW,CAAC;IAChB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;IAC/B,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,WAAW,CACnB,sCAAsC,GAAG,0BAA0B;YACjE,GAAG,eAAe,GAAG,CACxB,CAAC;IACJ,CAAC;IACD,IAAI,MAAM,CAAC,QAAQ,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QAChE,MAAM,IAAI,WAAW,CACnB,8CAA8C,MAAM,CAAC,QAAQ,YAAY;YACvE,mBAAmB,eAAe,GAAG,CACxC,CAAC;IACJ,CAAC;IACD,sEAAsE;IACtE,yEAAyE;IACzE,0EAA0E;IAC1E,0BAA0B;IAC1B,OAAO,MAAM,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AAC/C,CAAC;AAED,SAAS,WAAW,CAAC,GAAuB;IAC1C,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,CAAC,IAAI,EAAE,KAAK,EAA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,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"}
@@ -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 assertFixedQuery(value, toolName) {
34
- // Absent is the common case: only tools that pin a parameter carry the field,
35
- // and contracts generated before it existed carry it nowhere.
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 fixed_query.`);
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 fixed_query.`);
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: assertFixedQuery(candidate.fixed_query, toolName),
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
  }
@@ -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;AA4DvC;;;;;;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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,CAAC,CAAC,CAAC;IAEH,0EAA0E;IAC1E,uEAAuE;IACvE,+DAA+D;IAC/D,IAAI,QAAQ,CAAC,YAAY,KAAK,SAAS,IAAI,QAAQ,CAAC,YAAY,KAAK,EAAE,EAAE,CAAC;QACxE,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;IAC9C,CAAC;IACD,IAAI,OAAO,QAAQ,CAAC,YAAY,KAAK,QAAQ,EAAE,CAAC;QAC9C,IAAI,CAAC,+BAA+B,CAAC,CAAC;IACxC,CAAC;IACD,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 Settings → API Keys at https://fettle.sh, then " +
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 in Settings → API Keys at " +
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
  }
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AASH;;;;;;GAMG;AACH,MAAM,0BAA0B,GAAG,iCAAiC,CAAC;AAErE,SAAS,cAAc,CAAC,IAAsB;IAC5C,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAClB,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,IAAI,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;QACpC,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IACD,IAAI,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;QACrC,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,eAAe,CAAC,OAAe;IACtC,OAAO,OAAO,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;AAC7C,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,wBAAwB,CAAC,MAAiB;IACjD,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YAChD,SAAS;QACX,CAAC;QACD,MAAM,SAAS,GAAG,KAAyC,CAAC;QAC5D,MAAM,GAAG,GAAG,KAAK,CAAC,OAA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
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. Route the declared query parameters into the query string, then the
68
- * operation's pinned `fixed_query` pairs, which override any same name.
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&regions=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. Route the declared query parameters into the query string, then the
131
- * operation's pinned `fixed_query` pairs, which override any same name.
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.
@@ -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,QAAQ,CAAC,EACpD,CAAC;YACD,MAAM,IAAI,iBAAiB,CACzB,SAAS,IAAI,CAAC,IAAI,eAAe,IAAI,gCAAgC;gBACnE,OAAO,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,GAAG,GAAG,CAC/C,CAAC;QACJ,CAAC;QACD,MAAM,KAA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,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
@@ -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,EAAqB,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAqB,MAAM,eAAe,CAAC;AACxF,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAO1E;;;;;;;;;GASG;AACH,SAAS,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,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.6.0",
3
+ "version": "1.8.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": [