Skip to main content
Glama
diegofornalha

MCP Sentry para Cursor

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);
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It describes the search functionality but doesn't mention whether this is a read-only operation, if it requires specific permissions, rate limits, pagination behavior, or what the return format looks like. For a search tool with zero annotation coverage, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with two sentences that directly address the tool's purpose. It's front-loaded with the core functionality and avoids unnecessary details. However, the second sentence slightly repeats the first without adding new information, which prevents a perfect score.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (search operation with 2 parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects like safety, permissions, or return format, and while the schema handles parameters, the overall context for an AI agent to use this tool effectively is insufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with both parameters ('projectSlug' and 'filename') documented in the schema. The description adds marginal value by reinforcing that 'filename' refers to 'file path or filename to search for,' but doesn't provide additional syntax, format details, or examples beyond what the schema already states. Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Search for Sentry errors occurring in a specific file' and 'Find all issues related to a particular file path or filename.' It specifies the verb (search/find) and resource (Sentry errors/issues filtered by file). However, it doesn't explicitly differentiate from sibling tools like 'sentry_list_issues' or 'sentry_list_error_events_in_project' beyond the file-specific focus.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by stating it searches 'in a specific file' and 'related to a particular file path or filename,' suggesting it should be used when file-based error filtering is needed. However, it doesn't provide explicit guidance on when to use this tool versus alternatives like 'sentry_list_issues' or 'sentry_list_error_events_in_project,' nor does it mention any exclusions or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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