rollbar_get_occurrence
Retrieve a specific error occurrence from Rollbar using its unique ID to analyze error details and debug issues.
Instructions
Get a specific occurrence of an error from Rollbar
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Occurrence ID |
Implementation Reference
- src/rollbar.ts:445-461 (handler)Handler function that executes the rollbar_get_occurrence tool by calling the Rollbar API to fetch a specific occurrence by its ID using the projectClient.case "rollbar_get_occurrence": { // Project Token is required if (!projectClient) { throw new Error("ROLLBAR_PROJECT_TOKEN is not set, cannot use this API"); } const { id } = args as { id: string }; const response = await projectClient.get<OccurrenceResponse>(`/instance/${id}`); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; }
- src/rollbar.ts:192-202 (schema)Schema definition for the rollbar_get_occurrence tool, specifying the input parameters and description.const GET_OCCURRENCE_TOOL: Tool = { name: "rollbar_get_occurrence", description: "Get a specific occurrence of an error from Rollbar", inputSchema: { type: "object", properties: { id: { type: "string", description: "Occurrence ID" }, }, required: ["id"], }, };
- src/rollbar.ts:298-314 (registration)Registration of the rollbar_get_occurrence tool (via GET_OCCURRENCE_TOOL) in the listTools request handler, making it available to clients.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ LIST_ITEMS_TOOL, GET_ITEM_TOOL, GET_ITEM_BY_UUID_TOOL, GET_ITEM_BY_COUNTER_TOOL, LIST_OCCURRENCES_TOOL, GET_OCCURRENCE_TOOL, LIST_PROJECTS_TOOL, GET_PROJECT_TOOL, LIST_ENVIRONMENTS_TOOL, LIST_USERS_TOOL, GET_USER_TOOL, LIST_DEPLOYS_TOOL, GET_DEPLOY_TOOL, ], }));