Skip to main content
Glama

get_honeybadger_fault

Fetch a specific error from Honeybadger by ID to analyze and troubleshoot application issues directly in your development environment.

Instructions

Fetch a specific fault/error from Honeybadger by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fault_idYesThe ID of the fault to fetch
project_idNoOptional project ID (uses env var if not provided)

Implementation Reference

  • The handler function that executes the tool logic: fetches the fault details from Honeybadger API by ID and returns formatted JSON.
    private async getFault(faultId: string, projectId?: string): 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}`); return { content: [ { type: 'text', text: JSON.stringify(data, null, 2), }, ], }; }
  • Input schema defining parameters for the get_honeybadger_fault tool: fault_id (required), project_id (optional).
    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'], },
  • src/index.ts:94-111 (registration)
    Registration of the get_honeybadger_fault tool in the listTools response, including name, description, and schema.
    { 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'], }, },
  • Switch case in the central CallToolRequest handler that dispatches to the getFault method.
    case 'get_honeybadger_fault': return await this.getFault(args.fault_id as string, args.project_id as string | undefined);
  • Helper method used by getFault to make authenticated API requests to Honeybadger.
    private async makeHoneybadgerRequest(endpoint: string, params: any = {}) { if (!this.config.apiKey) { throw new McpError(ErrorCode.InvalidRequest, 'HONEYBADGER_API_KEY environment variable is required'); } const username = this.config.apiKey; const password = ''; const url = `${this.config.baseUrl}/v2${endpoint}`; const credentials = Buffer.from(`${username}:${password}`).toString('base64'); try { const response = await axios.get(url, { headers: { 'Authorization': `Basic ${credentials}`, 'Accept': 'application/json', }, params, }); return response.data; } catch (error: any) { if (error.response) { throw new McpError( ErrorCode.InvalidRequest, `Honeybadger API error: ${error.response.status} - ${error.response.data?.error || error.response.statusText}` ); } throw new McpError(ErrorCode.InternalError, `Network error: ${error.message}`); } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vishalzambre/honeybadger-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server