list_honeybadger_faults
Fetch and filter recent application faults from Honeybadger by project, environment, or resolution status to analyze and troubleshoot errors directly in your development workflow.
Instructions
List recent faults from Honeybadger
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| environment | No | Filter by environment (e.g., production, staging) | |
| limit | No | Number of faults to fetch (default: 20, max: 100) | |
| project_id | No | Optional project ID (uses env var if not provided) | |
| resolved | No | Filter by resolved status |
Implementation Reference
- src/index.ts:292-315 (handler)The main handler function for the 'list_honeybadger_faults' tool. It constructs API parameters from input args, calls makeHoneybadgerRequest to fetch faults from the Honeybadger API, and returns the JSON response as tool content.private async listFaults(args: any): Promise<any> { const pid = args.project_id || this.config.projectId; if (!pid) { throw new McpError(ErrorCode.InvalidRequest, 'Project ID is required'); } const params: any = { limit: Math.min(args.limit || 20, 100), }; if (args.environment) params.environment = args.environment; if (typeof args.resolved === 'boolean') params.resolved = args.resolved; const data = await this.makeHoneybadgerRequest(`/projects/${pid}/faults`, params); return { content: [ { type: 'text', text: JSON.stringify(data, null, 2), }, ], }; }
- src/index.ts:136-161 (schema)Input schema definition for the 'list_honeybadger_faults' tool, specifying optional parameters for filtering and limiting faults.name: 'list_honeybadger_faults', description: 'List recent faults from Honeybadger', inputSchema: { type: 'object', properties: { project_id: { type: 'string', description: 'Optional project ID (uses env var if not provided)', }, limit: { type: 'number', description: 'Number of faults to fetch (default: 20, max: 100)', default: 20, }, environment: { type: 'string', description: 'Filter by environment (e.g., production, staging)', }, resolved: { type: 'boolean', description: 'Filter by resolved status', }, }, required: [], }, },
- src/index.ts:204-205 (registration)Registration in the tool dispatcher switch statement, routing calls to the listFaults handler method.case 'list_honeybadger_faults': return await this.listFaults(args as any);
- src/index.ts:91-187 (registration)Tool registration in the ListToolsRequestSchema handler, including it in the list of available tools.this.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: [ { name: 'get_honeybadger_fault', description: 'Fetch a specific fault/error from Honeybadger by ID', inputSchema: { type: 'object', properties: { fault_id: { type: 'string', description: 'The ID of the fault to fetch', }, project_id: { type: 'string', description: 'Optional project ID (uses env var if not provided)', }, }, required: ['fault_id'], }, }, { name: 'get_honeybadger_notices', description: 'Fetch notices (occurrences) for a specific fault', inputSchema: { type: 'object', properties: { fault_id: { type: 'string', description: 'The ID of the fault to fetch notices for', }, project_id: { type: 'string', description: 'Optional project ID (uses env var if not provided)', }, limit: { type: 'number', description: 'Number of notices to fetch (default: 10, max: 100)', default: 10, }, }, required: ['fault_id'], }, }, { name: 'list_honeybadger_faults', description: 'List recent faults from Honeybadger', inputSchema: { type: 'object', properties: { project_id: { type: 'string', description: 'Optional project ID (uses env var if not provided)', }, limit: { type: 'number', description: 'Number of faults to fetch (default: 20, max: 100)', default: 20, }, environment: { type: 'string', description: 'Filter by environment (e.g., production, staging)', }, resolved: { type: 'boolean', description: 'Filter by resolved status', }, }, required: [], }, }, { name: 'analyze_honeybadger_issue', description: 'Comprehensive analysis of a Honeybadger issue with fix suggestions', inputSchema: { type: 'object', properties: { fault_id: { type: 'string', description: 'The ID of the fault to analyze', }, project_id: { type: 'string', description: 'Optional project ID (uses env var if not provided)', }, include_context: { type: 'boolean', description: 'Include request context and parameters in analysis', default: true, }, }, required: ['fault_id'], }, }, ], }; });