Skip to main content
Glama
diegofornalha

MCP Sentry para Cursor

sentry_get_issue

Retrieve and analyze Sentry issues by providing an issue URL or ID to monitor application errors and performance.

Instructions

Retrieve and analyze a Sentry issue. Accepts issue URL or ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issueIdYesIssue ID or URL

Implementation Reference

  • The main handler for the 'sentry_get_issue' tool within the MCP server request handler switch statement. It validates the API client, extracts the issueId from arguments, fetches the issue using apiClient.getIssue, and formats a detailed text response with key issue properties.
    case "sentry_get_issue": {
      if (!apiClient) {
        throw new Error("Sentry API client not initialized. Provide auth token.");
      }
      
      const { issueId } = args as any;
      const issue = await apiClient.getIssue(issueId);
      
      return {
        content: [
          {
            type: "text",
            text: `Issue ${issueId} details:\n` +
              `- Title: ${issue.title}\n` +
              `- Short ID: ${issue.shortId}\n` +
              `- Status: ${issue.status}\n` +
              `- Level: ${issue.level}\n` +
              `- Platform: ${issue.platform || 'N/A'}\n` +
              `- First seen: ${issue.firstSeen}\n` +
              `- Last seen: ${issue.lastSeen}\n` +
              `- Event count: ${issue.count}\n` +
              `- User count: ${issue.userCount}`,
          },
        ],
      };
    }
  • Input schema definition for the 'sentry_get_issue' tool, specifying a required 'issueId' string parameter. This is part of the tools array used for MCP tool registration.
      name: "sentry_get_issue",
      description: "Retrieve and analyze a Sentry issue. Accepts issue URL or ID.",
      inputSchema: {
        type: "object",
        properties: {
          issueId: {
            type: "string",
            description: "Issue ID or URL",
          },
        },
        required: ["issueId"],
      },
    },
  • src/index.ts:615-690 (registration)
    The 'sentry_get_issue' tool is registered in the MCP server's tools array, which is passed to the server for tool discovery and invocation.
        {
          name: "sentry_get_issue",
          description: "Retrieve and analyze a Sentry issue. Accepts issue URL or ID.",
          inputSchema: {
            type: "object",
            properties: {
              issueId: {
                type: "string",
                description: "Issue ID or URL",
              },
            },
            required: ["issueId"],
          },
        },
        {
          name: "sentry_list_organization_replays",
          description: "List replays from a Sentry organization. Monitor user sessions, interactions, errors and experience issues.",
          inputSchema: {
            type: "object",
            properties: {
              project: {
                type: "string",
                description: "Project ID or slug",
              },
              limit: {
                type: "number",
                description: "Number of replays to return",
                default: 50,
              },
              query: {
                type: "string",
                description: "Search query",
              },
            },
            required: [],
          },
        },
        {
          name: "sentry_setup_project",
          description: "Set up Sentry for a project returning a DSN and instructions for setup.",
          inputSchema: {
            type: "object",
            properties: {
              projectSlug: {
                type: "string",
                description: "Project slug/identifier",
              },
              platform: {
                type: "string",
                description: "Platform for installation instructions",
                default: "javascript",
              },
            },
            required: ["projectSlug"],
          },
        },
        {
          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"],
          },
        },
      ],
    };
  • Helper method in SentryAPIClient that performs the HTTP GET request to retrieve Sentry issue details by ID via the generic request method.
    async getIssue(issueId: string) {
      return this.request(`/issues/${issueId}/`);
    }
  • Generic private request method used by all API client methods, including getIssue, to make authenticated HTTP requests to Sentry API.
    private async request(endpoint: string, options: any = {}) {
      const url = `${this.baseUrl}${endpoint}`;
      const response = await fetch(url, {
        ...options,
        headers: {
          'Authorization': `Bearer ${this.authToken}`,
          'Content-Type': 'application/json',
          ...options.headers,
        },
      });
    
      if (!response.ok) {
        throw new Error(`Sentry API error: ${response.status} ${response.statusText}`);
      }
    
      return response.json();
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'Retrieve and analyze', implying a read-only operation, but doesn't specify what 'analyze' entails (e.g., returns detailed metadata, statistics, or related data). Critical behavioral traits like authentication needs, rate limits, error handling, or response format are omitted, making it insufficient for a tool with potential complexity.

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

Conciseness5/5

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

The description is extremely concise with two short sentences that are front-loaded: the first states the core purpose, and the second specifies the input. There is zero waste or redundancy, making it efficient and easy to parse, though this conciseness comes at the cost of completeness in other dimensions.

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 context: no annotations, no output schema, and a single parameter with full schema coverage, the description is incomplete. It fails to explain what 'analyze' means in terms of return values or behavior, which is crucial for a tool that might provide rich issue data. For a retrieval tool in a complex system like Sentry, more detail on output or analysis scope is needed to be adequately helpful.

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 input schema has 100% description coverage, with the parameter 'issueId' documented as 'Issue ID or URL'. The description adds no additional meaning beyond this, merely restating 'Accepts issue URL or ID'. Since the schema already fully describes the parameter, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

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 with specific verbs ('Retrieve and analyze') and identifies the resource ('a Sentry issue'). It distinguishes from siblings like 'sentry_list_issues' (which lists multiple issues) by focusing on a single issue, though it doesn't explicitly mention this distinction. The purpose is unambiguous but could be more precise about the 'analyze' aspect.

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 by specifying it accepts 'issue URL or ID', suggesting it's for fetching details of a known issue. However, it lacks explicit guidance on when to use this versus alternatives like 'sentry_get_event' (for specific events) or 'sentry_list_issues' (for browsing). No exclusions or prerequisites are mentioned, leaving usage context somewhat inferred.

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