Skip to main content
Glama
hiyorineko

Rollbar MCP Server

by hiyorineko

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
NameRequiredDescriptionDefault
idYesOccurrence ID

Implementation Reference

  • 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),
          },
        ],
      };
    }
  • 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,
      ],
    }));

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