Skip to main content
Glama
zereight

Sentry MCP Server

get_event_details

Retrieve detailed information for a specific error event in Sentry to analyze and debug issues using organization, project, and event identifiers.

Instructions

Get details for a specific event within a project.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
organization_slugNoThe slug of the organization the project belongs to.
project_slugYesThe slug of the project the event belongs to.
event_idYesThe ID of the event to retrieve.

Implementation Reference

  • Handler for 'get_event_details' tool: validates inputs (project_slug required, event_id 32-hex), defaults org_slug, calls Sentry API /projects/{org}/{project}/events/{event}/, returns JSON response or error.
    case 'get_event_details': {
      let { organization_slug, project_slug, event_id } = request.params.arguments ?? {};
    
       // If user doesn't provide slug, use default value read from environment variable
       organization_slug = typeof organization_slug === 'string' ? organization_slug : this.defaultOrgSlug;
       // Removed project_slug default assignment
    
      // Added project_slug required check
      if (typeof project_slug !== 'string' || project_slug.length === 0) {
         throw new McpError(ErrorCode.InvalidParams, 'Missing or invalid argument: project_slug must be a non-empty string.');
      }
      // event_id required and format check
      if (typeof event_id !== 'string') { // First check if it's string type
        throw new McpError(ErrorCode.InvalidParams, 'Missing or invalid argument: event_id must be a string.');
      }
      // Event ID validation (32-char hex) - event_id is now guaranteed to be string type
      const eventIdRegex = /^[a-f0-9]{32}$/i;
      if (!eventIdRegex.test(event_id)) {
        throw new McpError(ErrorCode.InvalidParams, `Invalid event_id format: '${event_id}'. Please provide a valid 32-character hexadecimal Sentry Event ID. You can get this by clicking 'Copy Event ID' in Sentry.`);
      }
    
      try {
        const response = await this.axiosInstance.get(
          `projects/${organization_slug}/${project_slug}/events/${event_id}/`
        );
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(response.data, null, 2),
            },
          ],
        };
      } catch (error) {
         let errorMessage = 'Failed to fetch Sentry event details.';
         if (axios.isAxiosError(error)) {
           errorMessage = `Sentry API error: ${error.response?.status} ${error.response?.statusText}. ${JSON.stringify(error.response?.data)}`;
           console.error("Sentry API Error Details:", error.response?.data);
         } else if (error instanceof Error) {
             errorMessage = error.message;
         }
         console.error("Error fetching Sentry event details:", error);
        return {
          content: [ { type: 'text', text: errorMessage } ],
          isError: true,
        };
      }
      break; // End case
  • src/index.ts:169-190 (registration)
    Tool registration in ListToolsRequestSchema response, defining name, description, and input schema with required event_id and project_slug, optional organization_slug.
    {
      name: 'get_event_details',
      description: 'Get details for a specific event within a project.',
      inputSchema: {
        type: 'object',
        properties: {
          organization_slug: {
            type: 'string',
            description: 'The slug of the organization the project belongs to.',
          },
          project_slug: {
            type: 'string',
            description: 'The slug of the project the event belongs to.',
          },
          event_id: {
            type: 'string',
            description: 'The ID of the event to retrieve.',
          },
        },
        required: ['event_id', 'project_slug'], // Changed project_slug to required
      },
    },
  • Input schema definition for 'get_event_details' tool, specifying properties and required fields.
    inputSchema: {
      type: 'object',
      properties: {
        organization_slug: {
          type: 'string',
          description: 'The slug of the organization the project belongs to.',
        },
        project_slug: {
          type: 'string',
          description: 'The slug of the project the event belongs to.',
        },
        event_id: {
          type: 'string',
          description: 'The ID of the event to retrieve.',
        },
      },
      required: ['event_id', 'project_slug'], // Changed project_slug to required
    },
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 states it 'Get details' but doesn't specify if this is a read-only operation, what permissions are required, potential rate limits, or the format of returned details. This is a significant gap for a tool with no annotation coverage.

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 a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded and appropriately sized, making it easy to parse quickly.

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 complexity of retrieving event details with no annotations and no output schema, the description is incomplete. It doesn't explain what 'details' include, error conditions, or behavioral traits, leaving the agent with insufficient context for reliable invocation.

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%, so the input schema already documents all parameters (organization_slug, project_slug, event_id) with clear descriptions. The description adds no additional meaning beyond implying a hierarchical relationship (event within project within organization), which is minimal value over the schema.

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 verb ('Get') and resource ('details for a specific event within a project'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_sentry_issue' or 'list_project_issues', which might also retrieve event-related information, so it misses full sibling distinction.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites like needing organization or project context, nor does it compare to siblings such as 'get_sentry_issue' for issue-level details or 'list_project_issues' for multiple events, leaving usage ambiguous.

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

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