Skip to main content
Glama

sentry_search_errors_in_file

Search for Sentry errors occurring in a specific file to identify and resolve issues related to a particular file path or filename.

Instructions

Search for Sentry errors occurring in a specific file. Find all issues related to a particular file path or filename.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectSlugYesProject slug/identifier
filenameYesFile path or filename to search for

Implementation Reference

  • Tool handler that extracts parameters, calls SentryAPIClient.searchErrorsInFile, and formats the response.
    case "sentry_search_errors_in_file": { if (!apiClient) { throw new Error("Sentry API client not initialized. Provide auth token."); } const { projectSlug, filename } = args as any; const issues = await apiClient.searchErrorsInFile(projectSlug, filename); return { content: [ { type: "text", text: `Found ${issues.length} issues in file ${filename}:\n` + issues.map((i: any) => `- ${i.shortId}: ${i.title} (${i.count} events, ${i.userCount} users)` ).join('\n'), }, ], }; }
  • Tool schema definition including input schema and description, registered in listTools response.
    { name: "sentry_search_errors_in_file", description: "Search for Sentry errors occurring in a specific file. Find all issues related to a particular file path or filename.", inputSchema: { type: "object", properties: { projectSlug: { type: "string", description: "Project slug/identifier", }, filename: { type: "string", description: "File path or filename to search for", }, }, required: ["projectSlug", "filename"], }, },
  • Core helper method in SentryAPIClient that constructs a filename query and delegates to listIssues.
    async searchErrorsInFile(projectSlug: string, filename: string) { const query = `filename:"${filename}"`; return this.listIssues(projectSlug, query); }

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/diegofornalha/sentry-mcp-cursor'

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