Skip to main content
Glama
diegofornalha

MCP Sentry para Cursor

sentry_list_error_events_in_project

List recent error events from a Sentry project to monitor frequency patterns and occurrence timestamps for debugging.

Instructions

List error events from a specific Sentry project. View recent errors, frequency patterns and occurrence timestamps.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectSlugYesProject slug/identifier
limitNoNumber of events to return
queryNoSearch query

Implementation Reference

  • MCP tool handler that extracts parameters, calls SentryAPIClient.listErrorEventsInProject, and formats the response as text content listing error events.
    case "sentry_list_error_events_in_project": {
      if (!apiClient) {
        throw new Error("Sentry API client not initialized. Provide auth token.");
      }
      
      const { projectSlug, limit = 50, query } = args as any;
      const events = await apiClient.listErrorEventsInProject(projectSlug, { limit, query });
      
      return {
        content: [
          {
            type: "text",
            text: `Found ${events.length} error events in project ${projectSlug}:\n` +
              events.map((e: any) => `- ${e.title} (${e.eventID}) - ${e.dateCreated}`).join('\n'),
          },
        ],
      };
    }
  • Tool schema definition including name, description, and input schema with projectSlug required, optional limit and query.
      name: "sentry_list_error_events_in_project",
      description: "List error events from a specific Sentry project. View recent errors, frequency patterns and occurrence timestamps.",
      inputSchema: {
        type: "object",
        properties: {
          projectSlug: {
            type: "string",
            description: "Project slug/identifier",
          },
          limit: {
            type: "number",
            description: "Number of events to return",
            default: 50,
          },
          query: {
            type: "string",
            description: "Search query",
          },
        },
        required: ["projectSlug"],
      },
    },
  • Core implementation in SentryAPIClient that constructs and sends HTTP request to Sentry API endpoint for project events using the provided parameters.
    async listErrorEventsInProject(projectSlug: string, params?: any) {
      const queryParams = params ? '?' + new URLSearchParams(params).toString() : '';
      return this.request(`/projects/${this.org}/${projectSlug}/events/${queryParams}`);
    }

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