vs_incidents_list
List incidents for your organization, filtering by status, monitor, or paginating results.
Instructions
List incidents for the authenticated organization. Filter by status (OPEN/RESOLVED), monitor id, or paginate.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | OPEN or RESOLVED. | |
| monitorId | No | Filter to one monitor. | |
| page | No | ||
| limit | No | Default 50, max 200. |
Implementation Reference
- src/tools.ts:297-305 (handler)The handler function that executes the vs_incidents_list tool logic. It sends a GET request to /api/incidents with optional query parameters (status, monitorId, page, limit).
handler: async (args, client) => client.request('GET', '/api/incidents', { query: { status: pickString(args, 'status'), monitorId: pickString(args, 'monitorId'), page: pickNumber(args, 'page'), limit: pickNumber(args, 'limit'), }, }), - src/tools.ts:286-295 (schema)Input schema definition for vs_incidents_list. Accepts optional status, monitorId, page, and limit fields.
inputSchema: { type: 'object', properties: { status: { ...STR, description: 'OPEN or RESOLVED.' }, monitorId: { ...STR, description: 'Filter to one monitor.' }, page: { ...INT }, limit: { ...INT, description: 'Default 50, max 200.' }, }, additionalProperties: false, }, - src/tools.ts:282-306 (registration)Tool registration entry in the TOOLS array. Named 'vs_incidents_list', requires authentication, defined in src/tools.ts.
{ name: 'vs_incidents_list', description: 'List incidents for the authenticated organization. Filter by status (OPEN/RESOLVED), monitor id, or paginate.', inputSchema: { type: 'object', properties: { status: { ...STR, description: 'OPEN or RESOLVED.' }, monitorId: { ...STR, description: 'Filter to one monitor.' }, page: { ...INT }, limit: { ...INT, description: 'Default 50, max 200.' }, }, additionalProperties: false, }, requiresAuth: true, handler: async (args, client) => client.request('GET', '/api/incidents', { query: { status: pickString(args, 'status'), monitorId: pickString(args, 'monitorId'), page: pickNumber(args, 'page'), limit: pickNumber(args, 'limit'), }, }), }, - src/tools.ts:32-35 (helper)Helper function pickString used to safely extract optional string parameters from the tool arguments.
function pickString(args: Record<string, unknown>, key: string): string | undefined { const v = args[key]; return typeof v === 'string' && v.length > 0 ? v : undefined; } - src/tools.ts:37-40 (helper)Helper function pickNumber used to safely extract optional numeric parameters from the tool arguments.
function pickNumber(args: Record<string, unknown>, key: string): number | undefined { const v = args[key]; return typeof v === 'number' && Number.isFinite(v) ? v : undefined; }