get_incidents
Get historical incident records including outages and degradations for any AI tool over the last 90 days. Data sourced from 26 official provider status pages for reliable status history.
Instructions
Get historical incidents (outages, degradations) for any AI tool from the last 90 days. Sourced from 26 official provider status pages.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | Tool slug — e.g. "chatgpt", "claude", "gemini" | |
| limit | No | Number of incidents (default 10, max 50) |
Implementation Reference
- src/index.ts:119-141 (handler)The async handler function that executes the get_incidents tool logic: fetches incidents from the API, formats them into a readable text response.
async ({ slug, limit }) => { const qs = limit ? `?limit=${limit}` : '' const d = await fetchJSON<{ tool: { slug: string; name: string }; incidents: Incident[]; count: number }>( `/tools/${slug}/incidents${qs}` ) if (d.count === 0) { return { content: [{ type: 'text' as const, text: `No incidents found for ${d.tool.name} in the last 90 days.` }] } } const lines = [`**${d.tool.name}** — ${d.count} incident(s) in the last 90 days:\n`] for (const inc of d.incidents) { const resolved = inc.resolved_at ? `Resolved ${new Date(inc.resolved_at).toUTCString()}` : '🔴 ONGOING' const duration = inc.resolved_at ? ` (${Math.round((new Date(inc.resolved_at).getTime() - new Date(inc.started_at).getTime()) / 60000)}m)` : '' lines.push(`### ${inc.title}`, `${inc.severity.toUpperCase()} · ${resolved}${duration}`) if (inc.description) lines.push(inc.description) if (inc.affected_components?.length) lines.push(`Affected: ${inc.affected_components.join(', ')}`) lines.push('') } return { content: [{ type: 'text' as const, text: lines.join('\n') }] } } - src/index.ts:115-118 (schema)Input validation schema using Zod: slug (string) and optional limit (integer 1-50).
{ slug: z.string().describe('Tool slug — e.g. "chatgpt", "claude", "gemini"'), limit: z.number().int().min(1).max(50).optional().describe('Number of incidents (default 10, max 50)'), }, - src/index.ts:112-142 (registration)Tool registration via server.tool() with name 'get_incidents', description, schema, and handler.
server.tool( 'get_incidents', 'Get historical incidents (outages, degradations) for any AI tool from the last 90 days. Sourced from 26 official provider status pages.', { slug: z.string().describe('Tool slug — e.g. "chatgpt", "claude", "gemini"'), limit: z.number().int().min(1).max(50).optional().describe('Number of incidents (default 10, max 50)'), }, async ({ slug, limit }) => { const qs = limit ? `?limit=${limit}` : '' const d = await fetchJSON<{ tool: { slug: string; name: string }; incidents: Incident[]; count: number }>( `/tools/${slug}/incidents${qs}` ) if (d.count === 0) { return { content: [{ type: 'text' as const, text: `No incidents found for ${d.tool.name} in the last 90 days.` }] } } const lines = [`**${d.tool.name}** — ${d.count} incident(s) in the last 90 days:\n`] for (const inc of d.incidents) { const resolved = inc.resolved_at ? `Resolved ${new Date(inc.resolved_at).toUTCString()}` : '🔴 ONGOING' const duration = inc.resolved_at ? ` (${Math.round((new Date(inc.resolved_at).getTime() - new Date(inc.started_at).getTime()) / 60000)}m)` : '' lines.push(`### ${inc.title}`, `${inc.severity.toUpperCase()} · ${resolved}${duration}`) if (inc.description) lines.push(inc.description) if (inc.affected_components?.length) lines.push(`Affected: ${inc.affected_components.join(', ')}`) lines.push('') } return { content: [{ type: 'text' as const, text: lines.join('\n') }] } } ) - src/index.ts:33-37 (schema)The Incident TypeScript interface defining the shape of incident data returned from the API.
interface Incident { id: string; title: string; description: string | null; severity: string started_at: string; resolved_at: string | null; source: string affected_components: string[] | null; impact: string | null }