Skip to main content
Glama
rollbar

Rollbar MCP Server

Official
by rollbar

list-items

View and filter error tracking items in Rollbar projects by status, severity, environment, or search query to monitor and diagnose issues.

Instructions

List all items in the Rollbar project with optional search and filtering

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNoFilter by item status (e.g., 'active', 'resolved', 'muted') (default: 'active')active
levelNoFilter by severity levels (e.g., ['error', 'critical', 'warning'])
environmentNoFilter by environment (e.g., 'production', 'staging') (default: 'production')production
pageNoPage number for pagination (default: 1)
limitNoNumber of items per page (default: 20, max: 5000)
queryNoSearch query to filter items by title or content
projectNoProject name (optional when only one project is configured)

Implementation Reference

  • The handler function that executes the logic for the "list-items" tool, including parameter parsing, Rollbar API request formation, and response formatting.
      async ({
        status,
        level,
        environment,
        page,
        limit,
        query,
        project,
      }: {
        status?: string;
        level?: string[];
        environment?: string;
        page?: number;
        limit?: number;
        query?: string;
        project?: string;
      }) => {
        const { token, apiBase } = resolveProject(project);
        // Build query parameters
        const params = new URLSearchParams();
    
        if (status) {
          params.append("status", status);
        }
    
        if (level && level.length > 0) {
          level.forEach((l) => params.append("level", l));
        }
    
        if (environment) {
          params.append("environment", environment);
        }
    
        if (page && page > 1) {
          params.append("page", page.toString());
        }
    
        if (limit) {
          params.append("limit", limit.toString());
        }
    
        if (query) {
          params.append("q", query);
        }
    
        const listUrl = `${apiBase}/items/?${params.toString()}`;
    
        const listResponse = await makeRollbarRequest<
          RollbarApiResponse<RollbarListItemsResponse>
        >(listUrl, "list-items", token);
    
        if (listResponse.err !== 0) {
          const errorMessage =
            listResponse.message || `Unknown error (code: ${listResponse.err})`;
          throw new Error(`Rollbar API returned error: ${errorMessage}`);
        }
    
        const itemsData = listResponse.result;
    
        // Format the response to include pagination info and items
        const formattedResponse = {
          items: itemsData.items,
          pagination: {
            page: itemsData.page,
            total_count: itemsData.total_count,
            items_on_page: itemsData.items.length,
          },
          filters_applied: {
            status: status || null,
            level: level || null,
            environment: environment || null,
            query: query || null,
          },
        };
    
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(formattedResponse),
            },
          ],
        };
      },
    );
  • Zod schema defining the input parameters for the "list-items" tool.
    {
      status: z
        .string()
        .optional()
        .default("active")
        .describe(
          "Filter by item status (e.g., 'active', 'resolved', 'muted') (default: 'active')",
        ),
      level: z
        .array(z.string())
        .optional()
        .describe(
          "Filter by severity levels (e.g., ['error', 'critical', 'warning'])",
        ),
      environment: z
        .string()
        .optional()
        .default("production")
        .describe(
          "Filter by environment (e.g., 'production', 'staging') (default: 'production')",
        ),
      page: z
        .number()
        .int()
        .min(1)
        .optional()
        .default(1)
        .describe("Page number for pagination (default: 1)"),
      limit: z
        .number()
        .int()
        .min(1)
        .max(5000)
        .optional()
        .default(20)
        .describe("Number of items per page (default: 20, max: 5000)"),
      query: z
        .string()
        .optional()
        .describe("Search query to filter items by title or content"),
      project: buildProjectParam(),
    },
  • The registration function for the "list-items" tool within the MCP server.
    export function registerListItemsTool(server: McpServer) {
      server.tool(
        "list-items",
        "List all items in the Rollbar project with optional search and filtering",
        {
          status: z
            .string()
            .optional()
            .default("active")
            .describe(
              "Filter by item status (e.g., 'active', 'resolved', 'muted') (default: 'active')",
            ),
          level: z
            .array(z.string())
            .optional()
            .describe(
              "Filter by severity levels (e.g., ['error', 'critical', 'warning'])",
            ),
          environment: z
            .string()
            .optional()
            .default("production")
            .describe(
              "Filter by environment (e.g., 'production', 'staging') (default: 'production')",
            ),
          page: z
            .number()
            .int()
            .min(1)
            .optional()
            .default(1)
            .describe("Page number for pagination (default: 1)"),
          limit: z
            .number()
            .int()
            .min(1)
            .max(5000)
            .optional()
            .default(20)
            .describe("Number of items per page (default: 20, max: 5000)"),
          query: z
            .string()
            .optional()
            .describe("Search query to filter items by title or content"),
          project: buildProjectParam(),
        },
        async ({
          status,
          level,
          environment,
          page,
          limit,
          query,
          project,
        }: {
          status?: string;
          level?: string[];
          environment?: string;
          page?: number;
          limit?: number;
          query?: string;
          project?: string;
        }) => {
          const { token, apiBase } = resolveProject(project);
          // Build query parameters
          const params = new URLSearchParams();
    
          if (status) {
            params.append("status", status);
          }
    
          if (level && level.length > 0) {
            level.forEach((l) => params.append("level", l));
          }
    
          if (environment) {
            params.append("environment", environment);
          }
    
          if (page && page > 1) {
            params.append("page", page.toString());
          }
    
          if (limit) {
            params.append("limit", limit.toString());
          }
    
          if (query) {
            params.append("q", query);
          }
    
          const listUrl = `${apiBase}/items/?${params.toString()}`;
    
          const listResponse = await makeRollbarRequest<
            RollbarApiResponse<RollbarListItemsResponse>
          >(listUrl, "list-items", token);
    
          if (listResponse.err !== 0) {
            const errorMessage =
              listResponse.message || `Unknown error (code: ${listResponse.err})`;
            throw new Error(`Rollbar API returned error: ${errorMessage}`);
          }
    
          const itemsData = listResponse.result;
    
          // Format the response to include pagination info and items
          const formattedResponse = {
            items: itemsData.items,
            pagination: {
              page: itemsData.page,
              total_count: itemsData.total_count,
              items_on_page: itemsData.items.length,
            },
            filters_applied: {
              status: status || null,
              level: level || null,
              environment: environment || null,
              query: query || null,
            },
          };
    
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify(formattedResponse),
              },
            ],
          };
        },
      );
    }
Behavior2/5

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

With no annotations provided, the description carries the full disclosure burden but fails to explain key behaviors: it does not clarify what 'items' represent (errors/exceptions), describe the pagination model (despite page/limit parameters), mention rate limits, or explain the default 'production' environment behavior.

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

Conciseness3/5

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

While the single sentence is efficiently structured and front-loaded, it is inappropriately brief given the lack of annotations and output schema. The description fails to compensate for missing structured metadata with necessary explanatory context, making it under-specified rather than optimally concise.

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 seven parameters, zero annotations, and no output schema, the description is insufficiently complete. It omits explanation of the pagination behavior, the nature of Rollbar 'items', how results are ordered, and guidance on the project parameter's conditional requirement.

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 input schema has 100% description coverage, so the description does not need to replicate parameter details. The phrase 'optional search and filtering' broadly acknowledges the filtering capabilities, but adds no specific semantic value beyond what the schema already provides, warranting the baseline score.

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 (items in the Rollbar project), and mentions 'optional search and filtering' which hints at the tool's capabilities. However, it does not explicitly differentiate this from sibling tools like get-top-items or get-item-details, though the 'all items' phrasing implies comprehensiveness versus 'top'.

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?

No guidance is provided on when to use this tool versus alternatives like get-item-details (for specific items) or get-top-items (for trending issues). The description lacks prerequisites, such as when the 'project' parameter is required versus optional.

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

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