Skip to main content
Glama
hiyorineko

Rollbar MCP Server

by hiyorineko

rollbar_list_environments

Retrieve all available environments for a specific Rollbar project to manage error tracking across different deployment stages.

Instructions

List environments from Rollbar

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesProject ID

Implementation Reference

  • Handler that resolves the effective project ID and fetches the list of environments from the Rollbar project API.
    case "rollbar_list_environments": {
      // Project Token is required
      if (!projectClient) {
        throw new Error("ROLLBAR_PROJECT_TOKEN is not set, cannot use this API");
      }
    
      const { projectId } = args as { projectId: number };
    
      // Use environment variable project ID as default value, or search by project name
      const effectiveProjectId = await getEffectiveProjectId(projectId);
    
      if (!effectiveProjectId) {
        throw new Error("Project ID is required but not provided in request or environment variables");
      }
    
      const response = await projectClient.get<ListEnvironmentsResponse>(
        `/project/${effectiveProjectId}/environments`,
      );
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(response.data, null, 2),
          },
        ],
      };
    }
  • Input schema for the tool, defining the required projectId parameter.
    const LIST_ENVIRONMENTS_TOOL: Tool = {
      name: "rollbar_list_environments",
      description: "List environments from Rollbar",
      inputSchema: {
        type: "object",
        properties: {
          projectId: { type: "number", description: "Project ID" },
        },
        required: ["projectId"],
      },
    };
  • src/rollbar.ts:298-314 (registration)
    Tool registration in the ListToolsRequestSchema handler by including it in the returned tools list.
    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,
      ],
    }));
  • Response type definition for the list environments API call.
    export interface ListEnvironmentsResponse {
      environments: RollbarEnvironment[];
    }
  • Type definition for individual environment objects in the response.
    export interface RollbarEnvironment {
      id: number;
      name: string;
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states the action ('list') without detailing traits like whether it's read-only (implied but not explicit), pagination behavior, rate limits, authentication needs, or error handling. For a tool with zero annotation coverage, this leaves significant gaps in understanding its operational behavior.

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 extremely concise with a single sentence ('List environments from Rollbar'), making it front-loaded and free of unnecessary words. Every part of the sentence contributes to the core purpose, earning its place without waste.

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 the lack of annotations and output schema, the description is incomplete. It does not explain what the tool returns (e.g., a list of environment names or objects), error conditions, or behavioral nuances. For a tool with no structured support, the description should provide more context to aid an agent in proper invocation and interpretation of results.

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?

The description adds no meaning beyond the input schema, which has 100% coverage for the single parameter 'projectId'. Since the schema fully describes the parameter (type: number, description: Project ID), the baseline score is 3. The description does not compensate with additional context, such as how to obtain the project ID or its role in filtering environments.

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

Purpose3/5

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

The description 'List environments from Rollbar' clearly states the action (list) and resource (environments from Rollbar), making the purpose understandable. However, it lacks specificity about what 'environments' means in this context (e.g., development, staging, production) and does not differentiate from sibling tools like 'rollbar_list_projects' or 'rollbar_list_items', which also list resources. This vagueness prevents a higher score.

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. It does not mention prerequisites (e.g., needing a project ID), exclusions, or comparisons to sibling tools such as 'rollbar_list_projects' or 'rollbar_list_deploys'. Without this context, an agent might struggle to select the correct tool for listing Rollbar environments.

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