Skip to main content
Glama
hiyorineko

Rollbar MCP Server

by hiyorineko

rollbar_list_occurrences

Retrieve and analyze error occurrences from Rollbar to identify patterns and troubleshoot issues efficiently.

Instructions

List occurrences of errors from Rollbar

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemIdNoItem ID to filter occurrences
limitNoMaximum number of occurrences to return (default: 20)
pageNoPage number for pagination (default: 1)

Implementation Reference

  • Handler function for rollbar_list_occurrences tool. Fetches occurrences from Rollbar API, optionally filtered by itemId, using projectClient.
    case "rollbar_list_occurrences": { // Project Token is required if (!projectClient) { throw new Error("ROLLBAR_PROJECT_TOKEN is not set, cannot use this API"); } const { itemId, limit = 20, page = 1, } = args as { itemId?: number; limit?: number; page?: number; }; const params: Record<string, string | number> = { page, limit }; let endpoint = "/occurrences"; if (itemId) { endpoint = `/item/${itemId}/instances`; } const response = await projectClient.get<ListOccurrencesResponse>(endpoint, { params }); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; }
  • Tool schema definition for rollbar_list_occurrences, including input schema for parameters like itemId, limit, page.
    const LIST_OCCURRENCES_TOOL: Tool = { name: "rollbar_list_occurrences", description: "List occurrences of errors from Rollbar", inputSchema: { type: "object", properties: { itemId: { type: "number", description: "Item ID to filter occurrences" }, limit: { type: "number", description: "Maximum number of occurrences to return (default: 20)" }, page: { type: "number", description: "Page number for pagination (default: 1)" }, }, }, };
  • src/rollbar.ts:298-315 (registration)
    Registration of all tools including rollbar_list_occurrences (as LIST_OCCURRENCES_TOOL) in the MCP server for the ListToolsRequest.
    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, ], }));

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/hiyorineko/mcp-rollbar-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server