Skip to main content
Glama

sentry_list_issues

Retrieve and list project issues from Sentry using a project slug and optional search query for targeted error monitoring and debugging.

Instructions

List issues for a project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectSlugYesProject slug/identifier
queryNoSearch query (e.g., 'is:unresolved', 'level:error')

Implementation Reference

  • Handler case in the CallToolRequestSchema that executes the sentry_list_issues tool: checks for apiClient, extracts parameters, calls apiClient.listIssues(), and formats the response as text content listing up to 10 issues.
    case "sentry_list_issues": { if (!apiClient) { throw new Error("Sentry API client not initialized. Provide auth token."); } const { projectSlug, query } = args as any; const issues = await apiClient.listIssues(projectSlug, query); return { content: [ { type: "text", text: `Found ${issues.length} issues in ${projectSlug}:\n${issues.slice(0, 10).map((i: any) => `- [${i.level}] ${i.title} (${i.count} events)` ).join('\n')}${issues.length > 10 ? '\n... and more' : ''}`, }, ], }; }
  • src/index.ts:397-413 (registration)
    Registration of the sentry_list_issues tool in the ListToolsRequestSchema response, defining its name, description, and input schema.
    { name: "sentry_list_issues", description: "List issues for a project", inputSchema: { type: "object", properties: { projectSlug: { type: "string", description: "Project slug/identifier", }, query: { type: "string", description: "Search query (e.g., 'is:unresolved', 'level:error')", }, }, required: ["projectSlug"], },
  • Input schema definition for the sentry_list_issues tool, specifying required projectSlug and optional query parameters.
    inputSchema: { type: "object", properties: { projectSlug: { type: "string", description: "Project slug/identifier", }, query: { type: "string", description: "Search query (e.g., 'is:unresolved', 'level:error')", }, }, required: ["projectSlug"],
  • Core helper method in SentryAPIClient that constructs the API endpoint for listing issues and delegates to the private request method.
    async listIssues(projectSlug: string, query?: string) { const params = query ? `?query=${encodeURIComponent(query)}` : ''; return this.request(`/projects/${this.org}/${projectSlug}/issues/${params}`); }
  • Private request utility method used by listIssues to perform authenticated fetch requests to the 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(); }

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