Skip to main content
Glama

list_honeybadger_faults

Fetch recent application errors from Honeybadger to analyze and troubleshoot issues directly in your development environment.

Instructions

List recent faults from Honeybadger

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idNoOptional project ID (uses env var if not provided)
limitNoNumber of faults to fetch (default: 20, max: 100)
environmentNoFilter by environment (e.g., production, staging)
resolvedNoFilter by resolved status

Implementation Reference

  • The primary handler function for the 'list_honeybadger_faults' tool. It extracts parameters (project_id, limit, environment, resolved), makes an authenticated API request to Honeybadger's faults endpoint, and returns the JSON response formatted as MCP 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:135-161 (registration)
    Registration of the 'list_honeybadger_faults' tool in the ListToolsRequestSchema handler, including name, description, and input schema.
    { 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: [], }, },
  • Input schema defining optional parameters for listing faults: project_id, limit (default 20, max 100), environment, resolved.
    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)
    Dispatch case in CallToolRequestSchema handler that routes 'list_honeybadger_faults' calls to the listFaults method.
    case 'list_honeybadger_faults': return await this.listFaults(args as any);
  • Shared helper method makeHoneybadgerRequest used by listFaults to perform authenticated GET requests to the Honeybadger API.
    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