fettle-mcp 0.1.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/LICENSE +21 -0
- package/README.md +171 -0
- package/contracts/mcp_tools.json +620 -0
- package/dist/config.d.ts +36 -0
- package/dist/config.js +77 -0
- package/dist/config.js.map +1 -0
- package/dist/contract.d.ts +61 -0
- package/dist/contract.js +113 -0
- package/dist/contract.js.map +1 -0
- package/dist/errors.d.ts +32 -0
- package/dist/errors.js +141 -0
- package/dist/errors.js.map +1 -0
- package/dist/executor.d.ts +83 -0
- package/dist/executor.js +202 -0
- package/dist/executor.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +64 -0
- package/dist/index.js.map +1 -0
- package/dist/server.d.ts +27 -0
- package/dist/server.js +77 -0
- package/dist/server.js.map +1 -0
- package/dist/validation.d.ts +29 -0
- package/dist/validation.js +65 -0
- package/dist/validation.js.map +1 -0
- package/package.json +60 -0
|
@@ -0,0 +1,620 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"tools": [
|
|
4
|
+
{
|
|
5
|
+
"name": "list_monitors",
|
|
6
|
+
"title": "List monitors",
|
|
7
|
+
"description": "List the monitors in the organization the API key belongs to. Use this first to find a monitor's id before any other monitor tool.",
|
|
8
|
+
"scope": "read",
|
|
9
|
+
"input_schema": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"properties": {
|
|
12
|
+
"page": {
|
|
13
|
+
"minimum": 1,
|
|
14
|
+
"type": "integer"
|
|
15
|
+
},
|
|
16
|
+
"size": {
|
|
17
|
+
"maximum": 100,
|
|
18
|
+
"minimum": 1,
|
|
19
|
+
"type": "integer"
|
|
20
|
+
},
|
|
21
|
+
"q": {
|
|
22
|
+
"maxLength": 255,
|
|
23
|
+
"type": "string"
|
|
24
|
+
},
|
|
25
|
+
"sort": {
|
|
26
|
+
"enum": [
|
|
27
|
+
"status",
|
|
28
|
+
"up_first",
|
|
29
|
+
"name",
|
|
30
|
+
"newest",
|
|
31
|
+
"oldest"
|
|
32
|
+
],
|
|
33
|
+
"type": "string"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"required": [],
|
|
37
|
+
"additionalProperties": false
|
|
38
|
+
},
|
|
39
|
+
"operation": {
|
|
40
|
+
"method": "GET",
|
|
41
|
+
"path": "/v1/monitors",
|
|
42
|
+
"path_params": [],
|
|
43
|
+
"query": [
|
|
44
|
+
"page",
|
|
45
|
+
"size",
|
|
46
|
+
"q",
|
|
47
|
+
"sort"
|
|
48
|
+
],
|
|
49
|
+
"body": false
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "get_monitor",
|
|
54
|
+
"title": "Get a monitor",
|
|
55
|
+
"description": "Read one monitor's full configuration and current status by id.",
|
|
56
|
+
"scope": "read",
|
|
57
|
+
"input_schema": {
|
|
58
|
+
"type": "object",
|
|
59
|
+
"properties": {
|
|
60
|
+
"monitor_id": {
|
|
61
|
+
"format": "uuid",
|
|
62
|
+
"type": "string"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"required": [
|
|
66
|
+
"monitor_id"
|
|
67
|
+
],
|
|
68
|
+
"additionalProperties": false
|
|
69
|
+
},
|
|
70
|
+
"operation": {
|
|
71
|
+
"method": "GET",
|
|
72
|
+
"path": "/v1/monitors/{monitor_id}",
|
|
73
|
+
"path_params": [
|
|
74
|
+
"monitor_id"
|
|
75
|
+
],
|
|
76
|
+
"query": [],
|
|
77
|
+
"body": false
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "create_monitor",
|
|
82
|
+
"title": "Create a monitor",
|
|
83
|
+
"description": "Create a monitor that checks a URL, host or port on a schedule. config's shape depends on type: HTTP takes method, expected_status_codes, follow_redirects, verify_ssl, request_headers, request_body, all optional — omit config for HTTP to use its defaults; PING takes packet_count, optional; SSL takes warn_before_days, port, both optional; TCP requires port (no default) and takes optional expected_state (defaults to OPEN); DNS requires record_type (no default) and takes optional expected_value. Omitting config on a TCP or DNS monitor is rejected with a 422 for the missing field. regions accepts one or more of: eu-central, us-east, ap-southeast — except SSL and DNS monitors, which must target exactly one region (422 otherwise). How many regions a single monitor may use is also capped by plan, as low as 2 on FREE and PLUS. interval_seconds must be at least 30, but lower plans enforce a higher floor: FREE requires at least 120 seconds. Requires a key with the write scope.",
|
|
84
|
+
"scope": "write",
|
|
85
|
+
"input_schema": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"properties": {
|
|
88
|
+
"name": {
|
|
89
|
+
"maxLength": 255,
|
|
90
|
+
"minLength": 1,
|
|
91
|
+
"type": "string"
|
|
92
|
+
},
|
|
93
|
+
"type": {
|
|
94
|
+
"enum": [
|
|
95
|
+
"HTTP",
|
|
96
|
+
"PING",
|
|
97
|
+
"SSL",
|
|
98
|
+
"TCP",
|
|
99
|
+
"DNS"
|
|
100
|
+
],
|
|
101
|
+
"type": "string"
|
|
102
|
+
},
|
|
103
|
+
"target": {
|
|
104
|
+
"maxLength": 2048,
|
|
105
|
+
"minLength": 1,
|
|
106
|
+
"type": "string"
|
|
107
|
+
},
|
|
108
|
+
"interval_seconds": {
|
|
109
|
+
"maximum": 86400,
|
|
110
|
+
"minimum": 30,
|
|
111
|
+
"type": "integer"
|
|
112
|
+
},
|
|
113
|
+
"timeout_seconds": {
|
|
114
|
+
"maximum": 120,
|
|
115
|
+
"minimum": 1,
|
|
116
|
+
"type": "integer"
|
|
117
|
+
},
|
|
118
|
+
"regions": {
|
|
119
|
+
"items": {
|
|
120
|
+
"type": "string"
|
|
121
|
+
},
|
|
122
|
+
"minItems": 1,
|
|
123
|
+
"type": "array"
|
|
124
|
+
},
|
|
125
|
+
"config": {
|
|
126
|
+
"additionalProperties": true,
|
|
127
|
+
"type": "object"
|
|
128
|
+
},
|
|
129
|
+
"confirmation_threshold": {
|
|
130
|
+
"maximum": 10,
|
|
131
|
+
"minimum": 1,
|
|
132
|
+
"type": "integer"
|
|
133
|
+
},
|
|
134
|
+
"notification_cooldown_seconds": {
|
|
135
|
+
"maximum": 86400,
|
|
136
|
+
"minimum": 60,
|
|
137
|
+
"type": "integer"
|
|
138
|
+
},
|
|
139
|
+
"channel_ids": {
|
|
140
|
+
"items": {
|
|
141
|
+
"format": "uuid",
|
|
142
|
+
"type": "string"
|
|
143
|
+
},
|
|
144
|
+
"type": "array"
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"required": [
|
|
148
|
+
"name",
|
|
149
|
+
"type",
|
|
150
|
+
"target",
|
|
151
|
+
"interval_seconds",
|
|
152
|
+
"timeout_seconds",
|
|
153
|
+
"regions"
|
|
154
|
+
],
|
|
155
|
+
"additionalProperties": false
|
|
156
|
+
},
|
|
157
|
+
"operation": {
|
|
158
|
+
"method": "POST",
|
|
159
|
+
"path": "/v1/monitors",
|
|
160
|
+
"path_params": [],
|
|
161
|
+
"query": [],
|
|
162
|
+
"body": true
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"name": "update_monitor",
|
|
167
|
+
"title": "Update a monitor",
|
|
168
|
+
"description": "Change an existing monitor's settings. Only the fields you pass are modified; at least one field is required, or the request is rejected. config is the exception: passing it replaces the monitor's entire config, not just the keys you include — any field of that type's schema you leave out is reset to its default. Passing only port on a TCP monitor whose expected_state is CLOSED silently resets expected_state to OPEN unless you include it too. config's shape depends on the monitor's type: HTTP takes method, expected_status_codes, follow_redirects, verify_ssl, request_headers, request_body, all optional; PING takes packet_count, optional; SSL takes warn_before_days, port, both optional; TCP requires port (no default) and takes optional expected_state (defaults to OPEN); DNS requires record_type (no default) and takes optional expected_value. regions accepts one or more of: eu-central, us-east, ap-southeast — except SSL and DNS monitors, which must target exactly one region (422 otherwise). How many regions a single monitor may use is also capped by plan, as low as 2 on FREE and PLUS. interval_seconds must be at least 30, but lower plans enforce a higher floor: FREE requires at least 120 seconds. Requires a key with the write scope.",
|
|
169
|
+
"scope": "write",
|
|
170
|
+
"input_schema": {
|
|
171
|
+
"type": "object",
|
|
172
|
+
"properties": {
|
|
173
|
+
"monitor_id": {
|
|
174
|
+
"format": "uuid",
|
|
175
|
+
"type": "string"
|
|
176
|
+
},
|
|
177
|
+
"name": {
|
|
178
|
+
"maxLength": 255,
|
|
179
|
+
"minLength": 1,
|
|
180
|
+
"type": "string"
|
|
181
|
+
},
|
|
182
|
+
"interval_seconds": {
|
|
183
|
+
"maximum": 86400,
|
|
184
|
+
"minimum": 30,
|
|
185
|
+
"type": "integer"
|
|
186
|
+
},
|
|
187
|
+
"timeout_seconds": {
|
|
188
|
+
"maximum": 120,
|
|
189
|
+
"minimum": 1,
|
|
190
|
+
"type": "integer"
|
|
191
|
+
},
|
|
192
|
+
"regions": {
|
|
193
|
+
"items": {
|
|
194
|
+
"type": "string"
|
|
195
|
+
},
|
|
196
|
+
"minItems": 1,
|
|
197
|
+
"type": "array"
|
|
198
|
+
},
|
|
199
|
+
"config": {
|
|
200
|
+
"additionalProperties": true,
|
|
201
|
+
"type": "object"
|
|
202
|
+
},
|
|
203
|
+
"confirmation_threshold": {
|
|
204
|
+
"maximum": 10,
|
|
205
|
+
"minimum": 1,
|
|
206
|
+
"type": "integer"
|
|
207
|
+
},
|
|
208
|
+
"notification_cooldown_seconds": {
|
|
209
|
+
"maximum": 86400,
|
|
210
|
+
"minimum": 60,
|
|
211
|
+
"type": "integer"
|
|
212
|
+
},
|
|
213
|
+
"channel_ids": {
|
|
214
|
+
"items": {
|
|
215
|
+
"format": "uuid",
|
|
216
|
+
"type": "string"
|
|
217
|
+
},
|
|
218
|
+
"type": "array"
|
|
219
|
+
},
|
|
220
|
+
"badge_enabled": {
|
|
221
|
+
"type": "boolean"
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
"required": [
|
|
225
|
+
"monitor_id"
|
|
226
|
+
],
|
|
227
|
+
"additionalProperties": false
|
|
228
|
+
},
|
|
229
|
+
"operation": {
|
|
230
|
+
"method": "PATCH",
|
|
231
|
+
"path": "/v1/monitors/{monitor_id}",
|
|
232
|
+
"path_params": [
|
|
233
|
+
"monitor_id"
|
|
234
|
+
],
|
|
235
|
+
"query": [],
|
|
236
|
+
"body": true
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"name": "pause_monitor",
|
|
241
|
+
"title": "Pause a monitor",
|
|
242
|
+
"description": "Stop checking a monitor without deleting it — use before planned downtime. Requires a key with the write scope.",
|
|
243
|
+
"scope": "write",
|
|
244
|
+
"input_schema": {
|
|
245
|
+
"type": "object",
|
|
246
|
+
"properties": {
|
|
247
|
+
"monitor_id": {
|
|
248
|
+
"format": "uuid",
|
|
249
|
+
"type": "string"
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
"required": [
|
|
253
|
+
"monitor_id"
|
|
254
|
+
],
|
|
255
|
+
"additionalProperties": false
|
|
256
|
+
},
|
|
257
|
+
"operation": {
|
|
258
|
+
"method": "POST",
|
|
259
|
+
"path": "/v1/monitors/{monitor_id}/pause",
|
|
260
|
+
"path_params": [
|
|
261
|
+
"monitor_id"
|
|
262
|
+
],
|
|
263
|
+
"query": [],
|
|
264
|
+
"body": false
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"name": "resume_monitor",
|
|
269
|
+
"title": "Resume a monitor",
|
|
270
|
+
"description": "Resume checks on a paused monitor. Requires a key with the write scope.",
|
|
271
|
+
"scope": "write",
|
|
272
|
+
"input_schema": {
|
|
273
|
+
"type": "object",
|
|
274
|
+
"properties": {
|
|
275
|
+
"monitor_id": {
|
|
276
|
+
"format": "uuid",
|
|
277
|
+
"type": "string"
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
"required": [
|
|
281
|
+
"monitor_id"
|
|
282
|
+
],
|
|
283
|
+
"additionalProperties": false
|
|
284
|
+
},
|
|
285
|
+
"operation": {
|
|
286
|
+
"method": "POST",
|
|
287
|
+
"path": "/v1/monitors/{monitor_id}/resume",
|
|
288
|
+
"path_params": [
|
|
289
|
+
"monitor_id"
|
|
290
|
+
],
|
|
291
|
+
"query": [],
|
|
292
|
+
"body": false
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"name": "delete_monitor",
|
|
297
|
+
"title": "Delete a monitor",
|
|
298
|
+
"description": "Soft-delete a monitor: it stops being checked and no longer appears in the organization's monitor list. Prefer pause_monitor unless the user explicitly asked for deletion. Requires the write scope.",
|
|
299
|
+
"scope": "write",
|
|
300
|
+
"input_schema": {
|
|
301
|
+
"type": "object",
|
|
302
|
+
"properties": {
|
|
303
|
+
"monitor_id": {
|
|
304
|
+
"format": "uuid",
|
|
305
|
+
"type": "string"
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
"required": [
|
|
309
|
+
"monitor_id"
|
|
310
|
+
],
|
|
311
|
+
"additionalProperties": false
|
|
312
|
+
},
|
|
313
|
+
"operation": {
|
|
314
|
+
"method": "DELETE",
|
|
315
|
+
"path": "/v1/monitors/{monitor_id}",
|
|
316
|
+
"path_params": [
|
|
317
|
+
"monitor_id"
|
|
318
|
+
],
|
|
319
|
+
"query": [],
|
|
320
|
+
"body": false
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"name": "check_now",
|
|
325
|
+
"title": "Check a monitor now",
|
|
326
|
+
"description": "Re-arm a monitor to run on the scheduler's next tick instead of waiting out its interval. Returns the monitor record, not a check result — call get_monitor a moment later to see the outcome. A repeat call for the same monitor within 30 seconds is a silent no-op that returns it unchanged. Across monitors, calls are limited to 10 per minute keyed on the calling address (not the API key or the organization), answering 429 with Retry-After once exceeded — pace yourself if checking many monitors in a row. Requires a key with the write scope.",
|
|
327
|
+
"scope": "write",
|
|
328
|
+
"input_schema": {
|
|
329
|
+
"type": "object",
|
|
330
|
+
"properties": {
|
|
331
|
+
"monitor_id": {
|
|
332
|
+
"format": "uuid",
|
|
333
|
+
"type": "string"
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
"required": [
|
|
337
|
+
"monitor_id"
|
|
338
|
+
],
|
|
339
|
+
"additionalProperties": false
|
|
340
|
+
},
|
|
341
|
+
"operation": {
|
|
342
|
+
"method": "POST",
|
|
343
|
+
"path": "/v1/monitors/{monitor_id}/check-now",
|
|
344
|
+
"path_params": [
|
|
345
|
+
"monitor_id"
|
|
346
|
+
],
|
|
347
|
+
"query": [],
|
|
348
|
+
"body": false
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"name": "get_uptime_summary",
|
|
353
|
+
"title": "Get uptime for a monitor",
|
|
354
|
+
"description": "Uptime percentage, average response time and incident counts for one monitor over the 24-hour, 7-day and 30-day windows at once. Use this to answer 'how reliable has this been'.",
|
|
355
|
+
"scope": "read",
|
|
356
|
+
"input_schema": {
|
|
357
|
+
"type": "object",
|
|
358
|
+
"properties": {
|
|
359
|
+
"monitor_id": {
|
|
360
|
+
"format": "uuid",
|
|
361
|
+
"type": "string"
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
"required": [
|
|
365
|
+
"monitor_id"
|
|
366
|
+
],
|
|
367
|
+
"additionalProperties": false
|
|
368
|
+
},
|
|
369
|
+
"operation": {
|
|
370
|
+
"method": "GET",
|
|
371
|
+
"path": "/v1/monitors/{monitor_id}/stats",
|
|
372
|
+
"path_params": [
|
|
373
|
+
"monitor_id"
|
|
374
|
+
],
|
|
375
|
+
"query": [],
|
|
376
|
+
"body": false
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
"name": "list_incidents",
|
|
381
|
+
"title": "List incidents",
|
|
382
|
+
"description": "List incidents across the organization's monitors, optionally filtered to one monitor, to open or resolved ones, or to a period.",
|
|
383
|
+
"scope": "read",
|
|
384
|
+
"input_schema": {
|
|
385
|
+
"type": "object",
|
|
386
|
+
"properties": {
|
|
387
|
+
"page": {
|
|
388
|
+
"minimum": 1,
|
|
389
|
+
"type": "integer"
|
|
390
|
+
},
|
|
391
|
+
"size": {
|
|
392
|
+
"maximum": 100,
|
|
393
|
+
"minimum": 1,
|
|
394
|
+
"type": "integer"
|
|
395
|
+
},
|
|
396
|
+
"monitor_id": {
|
|
397
|
+
"format": "uuid",
|
|
398
|
+
"type": "string"
|
|
399
|
+
},
|
|
400
|
+
"status": {
|
|
401
|
+
"enum": [
|
|
402
|
+
"open",
|
|
403
|
+
"resolved"
|
|
404
|
+
],
|
|
405
|
+
"type": "string",
|
|
406
|
+
"description": "Filter by open or resolved; omit for both."
|
|
407
|
+
},
|
|
408
|
+
"cause": {
|
|
409
|
+
"enum": [
|
|
410
|
+
"TIMEOUT",
|
|
411
|
+
"DNS_FAILURE",
|
|
412
|
+
"CONNECTION_REFUSED",
|
|
413
|
+
"TLS_INVALID",
|
|
414
|
+
"HTTP_4XX",
|
|
415
|
+
"HTTP_5XX",
|
|
416
|
+
"HTTP_UNEXPECTED_STATUS",
|
|
417
|
+
"KEYWORD_MISSING",
|
|
418
|
+
"TOO_MANY_REDIRECTS",
|
|
419
|
+
"TARGET_BLOCKED",
|
|
420
|
+
"PORT_STATE_MISMATCH",
|
|
421
|
+
"INVALID_TARGET",
|
|
422
|
+
"HEARTBEAT_MISSED",
|
|
423
|
+
"HEARTBEAT_FAILED",
|
|
424
|
+
"UNKNOWN"
|
|
425
|
+
],
|
|
426
|
+
"type": "string",
|
|
427
|
+
"description": "Filter by structured failure cause."
|
|
428
|
+
},
|
|
429
|
+
"period_days": {
|
|
430
|
+
"maximum": 365,
|
|
431
|
+
"minimum": 1,
|
|
432
|
+
"type": "integer",
|
|
433
|
+
"description": "Only incidents started within the last N days."
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
"required": [],
|
|
437
|
+
"additionalProperties": false
|
|
438
|
+
},
|
|
439
|
+
"operation": {
|
|
440
|
+
"method": "GET",
|
|
441
|
+
"path": "/v1/incidents",
|
|
442
|
+
"path_params": [],
|
|
443
|
+
"query": [
|
|
444
|
+
"page",
|
|
445
|
+
"size",
|
|
446
|
+
"monitor_id",
|
|
447
|
+
"status",
|
|
448
|
+
"cause",
|
|
449
|
+
"period_days"
|
|
450
|
+
],
|
|
451
|
+
"body": false
|
|
452
|
+
}
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
"name": "acknowledge_incident",
|
|
456
|
+
"title": "Acknowledge an incident",
|
|
457
|
+
"description": "Acknowledge an open incident so repeat notifications stop while someone works on it. Requires a key with the write scope.",
|
|
458
|
+
"scope": "write",
|
|
459
|
+
"input_schema": {
|
|
460
|
+
"type": "object",
|
|
461
|
+
"properties": {
|
|
462
|
+
"incident_id": {
|
|
463
|
+
"format": "uuid",
|
|
464
|
+
"type": "string"
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
"required": [
|
|
468
|
+
"incident_id"
|
|
469
|
+
],
|
|
470
|
+
"additionalProperties": false
|
|
471
|
+
},
|
|
472
|
+
"operation": {
|
|
473
|
+
"method": "POST",
|
|
474
|
+
"path": "/v1/incidents/{incident_id}/acknowledge",
|
|
475
|
+
"path_params": [
|
|
476
|
+
"incident_id"
|
|
477
|
+
],
|
|
478
|
+
"query": [],
|
|
479
|
+
"body": false
|
|
480
|
+
}
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"name": "list_heartbeats",
|
|
484
|
+
"title": "List heartbeat monitors",
|
|
485
|
+
"description": "List heartbeat (cron / dead-man's-switch) monitors and when each was last pinged.",
|
|
486
|
+
"scope": "read",
|
|
487
|
+
"input_schema": {
|
|
488
|
+
"type": "object",
|
|
489
|
+
"properties": {
|
|
490
|
+
"page": {
|
|
491
|
+
"minimum": 1,
|
|
492
|
+
"type": "integer"
|
|
493
|
+
},
|
|
494
|
+
"size": {
|
|
495
|
+
"maximum": 100,
|
|
496
|
+
"minimum": 1,
|
|
497
|
+
"type": "integer"
|
|
498
|
+
},
|
|
499
|
+
"q": {
|
|
500
|
+
"maxLength": 255,
|
|
501
|
+
"type": "string"
|
|
502
|
+
},
|
|
503
|
+
"sort": {
|
|
504
|
+
"enum": [
|
|
505
|
+
"status",
|
|
506
|
+
"name",
|
|
507
|
+
"created_at"
|
|
508
|
+
],
|
|
509
|
+
"type": "string"
|
|
510
|
+
}
|
|
511
|
+
},
|
|
512
|
+
"required": [],
|
|
513
|
+
"additionalProperties": false
|
|
514
|
+
},
|
|
515
|
+
"operation": {
|
|
516
|
+
"method": "GET",
|
|
517
|
+
"path": "/v1/heartbeats",
|
|
518
|
+
"path_params": [],
|
|
519
|
+
"query": [
|
|
520
|
+
"page",
|
|
521
|
+
"size",
|
|
522
|
+
"q",
|
|
523
|
+
"sort"
|
|
524
|
+
],
|
|
525
|
+
"body": false
|
|
526
|
+
}
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"name": "create_heartbeat",
|
|
530
|
+
"title": "Create a heartbeat monitor",
|
|
531
|
+
"description": "Create a heartbeat monitor and get back the URL a scheduled job should ping. Requires a key with the write scope.",
|
|
532
|
+
"scope": "write",
|
|
533
|
+
"input_schema": {
|
|
534
|
+
"type": "object",
|
|
535
|
+
"properties": {
|
|
536
|
+
"name": {
|
|
537
|
+
"maxLength": 255,
|
|
538
|
+
"minLength": 1,
|
|
539
|
+
"type": "string"
|
|
540
|
+
},
|
|
541
|
+
"period_seconds": {
|
|
542
|
+
"maximum": 2592000,
|
|
543
|
+
"minimum": 60,
|
|
544
|
+
"type": "integer"
|
|
545
|
+
},
|
|
546
|
+
"grace_seconds": {
|
|
547
|
+
"maximum": 2592000,
|
|
548
|
+
"minimum": 0,
|
|
549
|
+
"type": "integer"
|
|
550
|
+
},
|
|
551
|
+
"notification_cooldown_seconds": {
|
|
552
|
+
"maximum": 86400,
|
|
553
|
+
"minimum": 60,
|
|
554
|
+
"type": "integer"
|
|
555
|
+
},
|
|
556
|
+
"channel_ids": {
|
|
557
|
+
"items": {
|
|
558
|
+
"format": "uuid",
|
|
559
|
+
"type": "string"
|
|
560
|
+
},
|
|
561
|
+
"type": "array"
|
|
562
|
+
}
|
|
563
|
+
},
|
|
564
|
+
"required": [
|
|
565
|
+
"name",
|
|
566
|
+
"period_seconds",
|
|
567
|
+
"grace_seconds"
|
|
568
|
+
],
|
|
569
|
+
"additionalProperties": false
|
|
570
|
+
},
|
|
571
|
+
"operation": {
|
|
572
|
+
"method": "POST",
|
|
573
|
+
"path": "/v1/heartbeats",
|
|
574
|
+
"path_params": [],
|
|
575
|
+
"query": [],
|
|
576
|
+
"body": true
|
|
577
|
+
}
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
"name": "list_status_pages",
|
|
581
|
+
"title": "List status pages",
|
|
582
|
+
"description": "List the organization's status pages, including each page's slug and whether it is currently published.",
|
|
583
|
+
"scope": "read",
|
|
584
|
+
"input_schema": {
|
|
585
|
+
"type": "object",
|
|
586
|
+
"properties": {
|
|
587
|
+
"page": {
|
|
588
|
+
"minimum": 1,
|
|
589
|
+
"type": "integer"
|
|
590
|
+
},
|
|
591
|
+
"size": {
|
|
592
|
+
"maximum": 100,
|
|
593
|
+
"minimum": 1,
|
|
594
|
+
"type": "integer"
|
|
595
|
+
},
|
|
596
|
+
"sort": {
|
|
597
|
+
"enum": [
|
|
598
|
+
"name",
|
|
599
|
+
"created_at"
|
|
600
|
+
],
|
|
601
|
+
"type": "string"
|
|
602
|
+
}
|
|
603
|
+
},
|
|
604
|
+
"required": [],
|
|
605
|
+
"additionalProperties": false
|
|
606
|
+
},
|
|
607
|
+
"operation": {
|
|
608
|
+
"method": "GET",
|
|
609
|
+
"path": "/v1/status-pages",
|
|
610
|
+
"path_params": [],
|
|
611
|
+
"query": [
|
|
612
|
+
"page",
|
|
613
|
+
"size",
|
|
614
|
+
"sort"
|
|
615
|
+
],
|
|
616
|
+
"body": false
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
]
|
|
620
|
+
}
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime configuration, read once at startup from the environment.
|
|
3
|
+
*
|
|
4
|
+
* An MCP server is spawned by its client with an env block from a JSON config
|
|
5
|
+
* file the user hand-edits, so a missing or malformed value is the single most
|
|
6
|
+
* likely failure of this package — and the worst place to discover it is
|
|
7
|
+
* inside the first tool call, where the model reports it to the user as if the
|
|
8
|
+
* *monitor* were the problem. Everything here therefore fails at startup, on
|
|
9
|
+
* stderr, naming the variable and the file to fix.
|
|
10
|
+
*/
|
|
11
|
+
/** Where the public API lives when `FETTLE_API_URL` is not set. */
|
|
12
|
+
export declare const DEFAULT_API_URL = "https://api.fettle.sh";
|
|
13
|
+
/**
|
|
14
|
+
* How long one tool call may take before it is abandoned.
|
|
15
|
+
*
|
|
16
|
+
* A hung request is worse here than a slow one: the MCP client has no timeout
|
|
17
|
+
* of its own for a stdio server, so an unbounded `fetch` presents to the user
|
|
18
|
+
* as a permanently frozen assistant. 30s is well past the API's own latency
|
|
19
|
+
* and well short of a human's patience.
|
|
20
|
+
*/
|
|
21
|
+
export declare const DEFAULT_TIMEOUT_MS = 30000;
|
|
22
|
+
export interface Config {
|
|
23
|
+
apiKey: string;
|
|
24
|
+
apiUrl: string;
|
|
25
|
+
timeoutMs: number;
|
|
26
|
+
}
|
|
27
|
+
export declare class ConfigError extends Error {
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Build the configuration or explain what is missing.
|
|
31
|
+
*
|
|
32
|
+
* Throws:
|
|
33
|
+
* ConfigError: `FETTLE_API_KEY` is absent or blank, `FETTLE_API_URL` is not a
|
|
34
|
+
* usable http(s) URL, or `FETTLE_TIMEOUT_MS` is not a positive integer.
|
|
35
|
+
*/
|
|
36
|
+
export declare function loadConfig(env?: NodeJS.ProcessEnv): Config;
|