sentry_resolve_short_id
Retrieve issue details, project context, and status using a short ID. Simplify error tracking and monitoring by mapping short IDs to comprehensive issue information.
Instructions
Retrieve details about an issue using its short ID. Maps short IDs to issue details, project context and status.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| shortId | Yes | The short ID of the issue (e.g., 'PROJ-123') |
Input Schema (JSON Schema)
{
"properties": {
"shortId": {
"description": "The short ID of the issue (e.g., 'PROJ-123')",
"type": "string"
}
},
"required": [
"shortId"
],
"type": "object"
}
Implementation Reference
- src/index.ts:1139-1163 (handler)Handler function that executes the sentry_resolve_short_id tool. Validates API client, calls resolveShortId on it, and formats the response with issue details.case "sentry_resolve_short_id": { if (!apiClient) { throw new Error("Sentry API client not initialized. Provide auth token."); } const { shortId } = args as any; const result = await apiClient.resolveShortId(shortId); return { content: [ { type: "text", text: `Issue resolved from short ID ${shortId}:\n` + `- Issue ID: ${result.groupId}\n` + `- Project: ${result.projectSlug}\n` + `- Organization: ${result.organizationSlug}\n` + `- Title: ${result.group.metadata.title}\n` + `- Status: ${result.group.status}\n` + `- Level: ${result.group.level}\n` + `- First seen: ${result.group.firstSeen}\n` + `- Last seen: ${result.group.lastSeen}`, }, ], }; }
- src/index.ts:516-528 (registration)Registration of the sentry_resolve_short_id tool in the ListTools response, including description and input schema.name: "sentry_resolve_short_id", description: "Retrieve details about an issue using its short ID. Maps short IDs to issue details, project context and status.", inputSchema: { type: "object", properties: { shortId: { type: "string", description: "The short ID of the issue (e.g., 'PROJ-123')", }, }, required: ["shortId"], }, },
- src/sentry-api-client.ts:167-169 (helper)Core helper method in SentryAPIClient that resolves the short ID by making a GET request to Sentry's /shortids/ endpoint.async resolveShortId(shortId: string) { return this.request(`/organizations/${this.org}/shortids/${shortId}/`); }
- src/types.ts:168-206 (schema)TypeScript interface defining the structure of the response from resolving a short ID, used in the tool's output handling.export interface ShortIdResolutionResponse { group: { annotations: any[]; assignedTo: any | null; count: string; culprit: string; firstSeen: string; hasSeen: boolean; id: string; isBookmarked: boolean; isPublic: boolean; isSubscribed: boolean; lastSeen: string; level: string; logger: string | null; metadata: { title: string; }; numComments: number; permalink: string; project: { id: string; name: string; slug: string; }; shareId: string | null; shortId: string; status: string; statusDetails: Record<string, any>; subscriptionDetails: any | null; title: string; type: string; userCount: number; }; groupId: string; organizationSlug: string; projectSlug: string; shortId: string; }
- src/sentry-api-client.ts:20-36 (helper)Private request method in SentryAPIClient that handles all HTTP requests to the Sentry API, used by resolveShortId.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(); }