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,
      ],
    }));
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states it's a list operation, implying read-only behavior, but doesn't disclose key traits like pagination details (implied by 'page' parameter), rate limits, authentication needs, or what the output looks like (e.g., format, fields). This leaves significant gaps for a tool with parameters.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste—it directly states the tool's action and resource. It's appropriately sized and front-loaded, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and three parameters, the description is incomplete. It lacks behavioral context (e.g., pagination behavior, response format) and usage guidelines, which are crucial for an AI agent to invoke this tool correctly in a server with multiple sibling tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents the three parameters (itemId, limit, page) with descriptions. The description adds no additional meaning beyond implying filtering by errors, which is already suggested by the tool name and context. Baseline 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('occurrences of errors from Rollbar'), making the tool's purpose understandable. However, it doesn't differentiate from sibling tools like 'rollbar_list_items' or 'rollbar_get_occurrence', which list related resources or get a single occurrence, so it misses full sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'rollbar_list_items' (for listing error items) and 'rollbar_get_occurrence' (for a single occurrence), there's no indication of context, prerequisites, or exclusions for this list operation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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