rollbar_list_items
Retrieve and filter error tracking data from Rollbar to monitor application issues by status, severity level, or environment.
Instructions
List items (errors) from Rollbar
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | Filter by status (active, resolved, muted, etc.) | |
| level | No | Filter by level (critical, error, warning, info, debug) | |
| environment | No | Filter by environment (production, staging, etc.) | |
| limit | No | Maximum number of items to return (default: 20) | |
| page | No | Page number for pagination (default: 1) |
Implementation Reference
- src/rollbar.ts:321-355 (handler)Executes the rollbar_list_items tool by calling the Rollbar /items API with optional filters for status, level, environment, limit, and page, returning the JSON response.case "rollbar_list_items": { // Project Token is required if (!projectClient) { throw new Error("ROLLBAR_PROJECT_TOKEN is not set, cannot use this API"); } const { status, level, environment, limit = 20, page = 1, } = args as { status?: string; level?: string; environment?: string; limit?: number; page?: number; }; const params: Record<string, string | number> = { page, limit }; if (status) params.status = status; if (level) params.level = level; if (environment) params.environment = environment; const response = await projectClient.get<ListItemsResponse>("/items", { params }); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; }
- src/rollbar.ts:126-139 (schema)Defines the input schema, name, and description for the rollbar_list_items tool.const LIST_ITEMS_TOOL: Tool = { name: "rollbar_list_items", description: "List items (errors) from Rollbar", inputSchema: { type: "object", properties: { status: { type: "string", description: "Filter by status (active, resolved, muted, etc.)" }, level: { type: "string", description: "Filter by level (critical, error, warning, info, debug)" }, environment: { type: "string", description: "Filter by environment (production, staging, etc.)" }, limit: { type: "number", description: "Maximum number of items to return (default: 20)" }, page: { type: "number", description: "Page number for pagination (default: 1)" }, }, }, };
- src/rollbar.ts:298-314 (registration)Registers the rollbar_list_items tool (as LIST_ITEMS_TOOL) in the server's list of available tools.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, ], }));