get_honeybadger_notices
Fetch error occurrences for a specific fault in Honeybadger to analyze and troubleshoot application issues directly from your development environment.
Instructions
Fetch notices (occurrences) for a specific fault
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fault_id | Yes | The ID of the fault to fetch notices for | |
| project_id | No | Optional project ID (uses env var if not provided) | |
| limit | No | Number of notices to fetch (default: 10, max: 100) |
Implementation Reference
- src/index.ts:272-290 (handler)The handler function that executes the 'get_honeybadger_notices' tool. It fetches notices for a given fault ID from the Honeybadger API using the configured project ID, applies a limit, and returns the JSON response formatted as MCP tool content.private async getNotices(faultId: string, projectId?: string, limit: number = 10): Promise<any> { const pid = projectId || this.config.projectId; if (!pid) { throw new McpError(ErrorCode.InvalidRequest, 'Project ID is required'); } const data = await this.makeHoneybadgerRequest(`/projects/${pid}/faults/${faultId}/notices`, { limit: Math.min(limit, 100), }); return { content: [ { type: 'text', text: JSON.stringify(data, null, 2), }, ], }; }
- src/index.ts:112-134 (registration)Tool registration in the ListTools response, including name, description, and input schema definition.{ 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'], }, },
- src/index.ts:201-202 (registration)Dispatch case in the CallToolRequest handler that routes the tool invocation to the getNotices method.case 'get_honeybadger_notices': return await this.getNotices(args.fault_id as string, args.project_id as string | undefined, args.limit as number | undefined);
- src/index.ts:126-131 (schema)Input schema properties for the tool, defining parameters like fault_id, project_id, and limit.limit: { type: 'number', description: 'Number of notices to fetch (default: 10, max: 100)', default: 10, }, },