rollbar_get_item_by_counter
Retrieve a specific error tracking item from Rollbar using its project counter ID to access detailed information for analysis and debugging.
Instructions
Get a specific item by project counter from Rollbar. The counter is the visible ID that appears in the Rollbar UI.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| counter | Yes | Project counter for the item |
Implementation Reference
- src/rollbar.ts:393-409 (handler)Handler implementation for the 'rollbar_get_item_by_counter' tool. Extracts 'counter' from arguments, checks for projectClient, makes GET request to `/item_by_counter/${counter}`, and returns JSON response.case "rollbar_get_item_by_counter": { // Project Token is required if (!projectClient) { throw new Error("ROLLBAR_PROJECT_TOKEN is not set, cannot use this API"); } const { counter } = args as { counter: number }; const response = await projectClient.get<ItemResponse>(`/item_by_counter/${counter}`); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; }
- src/rollbar.ts:166-177 (schema)Schema definition for the tool, including name, description, and input schema requiring a 'counter' number.const GET_ITEM_BY_COUNTER_TOOL: Tool = { name: "rollbar_get_item_by_counter", description: "Get a specific item by project counter from Rollbar. The counter is the visible ID that appears in the Rollbar UI.", inputSchema: { type: "object", properties: { counter: { type: "number", description: "Project counter for the item" }, }, required: ["counter"], }, };
- src/rollbar.ts:298-314 (registration)Registration of all tools in the ListToolsRequestHandler, including GET_ITEM_BY_COUNTER_TOOL at position for 'rollbar_get_item_by_counter'.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, ], }));