Skip to main content
Glama
hiyorineko

Rollbar MCP Server

by hiyorineko

rollbar_get_project

Retrieve project details from Rollbar error tracking by specifying the project ID to access configuration, settings, and metadata.

Instructions

Get a specific project from Rollbar

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesProject ID

Implementation Reference

  • Handler implementation for the 'rollbar_get_project' tool. Fetches project details from Rollbar API using the account client and effective project ID.
    case "rollbar_get_project": { // Account Token is required if (!accountClient) { throw new Error("ROLLBAR_ACCOUNT_TOKEN is not set, cannot use this API"); } const { id } = args as { id: number }; // Use environment variable project ID as default value, or search by project name const effectiveProjectId = await getEffectiveProjectId(id); if (!effectiveProjectId) { throw new Error("Project ID is required but not provided in request or environment variables"); } const response = await accountClient.get<ProjectResponse>(`/project/${effectiveProjectId}`); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; }
  • Tool schema for 'rollbar_get_project' defining the input schema requiring a project 'id'.
    const GET_PROJECT_TOOL: Tool = { name: "rollbar_get_project", description: "Get a specific project from Rollbar", inputSchema: { type: "object", properties: { id: { type: "number", description: "Project ID" }, }, required: ["id"], }, };
  • src/rollbar.ts:298-314 (registration)
    Registration of the 'rollbar_get_project' tool (as GET_PROJECT_TOOL) in the listTools request handler.
    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, ], }));
  • Helper function 'getEffectiveProjectId' used by the handler to resolve the project ID from args, env vars, or project name search.
    const getEffectiveProjectId = async (providedId?: number): Promise<number | undefined> => { // Use provided ID if available if (providedId) return providedId; // Use project ID from environment variable if available if (ROLLBAR_PROJECT_ID) return ROLLBAR_PROJECT_ID; // Search by project name if (ROLLBAR_PROJECT_NAME) { const idFromName = await findProjectIdByName(ROLLBAR_PROJECT_NAME); if (idFromName) return idFromName; } return undefined; };

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