Skip to main content
Glama
rollbar

Rollbar MCP Server

Official
by rollbar

update-item

Modify Rollbar error tracking items by updating status, severity level, title, assignment, or resolution details to manage and resolve issues.

Instructions

Update an item in Rollbar (status, level, title, assignment, etc.)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemIdYesThe ID of the item to update
statusNoThe new status for the item
levelNoThe new level for the item
titleNoThe new title for the item
assignedUserIdNoThe ID of the user to assign the item to
resolvedInVersionNoThe version in which the item was resolved
snoozedNoWhether the item should be snoozed (paid accounts only)
teamIdNoThe ID of the team to assign as owner (Advanced/Enterprise accounts only)
projectNoProject name (optional when only one project is configured)

Implementation Reference

  • The `registerUpdateItemTool` function defines and implements the "update-item" tool, including Zod-based input validation and the execution logic that calls the Rollbar API.
    export function registerUpdateItemTool(server: McpServer) {
      server.tool(
        "update-item",
        "Update an item in Rollbar (status, level, title, assignment, etc.)",
        {
          itemId: z.number().int().describe("The ID of the item to update"),
          status: z
            .enum(["active", "resolved", "muted", "archived"])
            .optional()
            .describe("The new status for the item"),
          level: z
            .enum(["debug", "info", "warning", "error", "critical"])
            .optional()
            .describe("The new level for the item"),
          title: z.string().optional().describe("The new title for the item"),
          assignedUserId: z
            .number()
            .int()
            .optional()
            .describe("The ID of the user to assign the item to"),
          resolvedInVersion: z
            .string()
            .optional()
            .describe("The version in which the item was resolved"),
          snoozed: z
            .boolean()
            .optional()
            .describe("Whether the item should be snoozed (paid accounts only)"),
          teamId: z
            .number()
            .int()
            .optional()
            .describe(
              "The ID of the team to assign as owner (Advanced/Enterprise accounts only)",
            ),
          project: buildProjectParam(),
        },
        async ({
          itemId,
          status,
          level,
          title,
          assignedUserId,
          resolvedInVersion,
          snoozed,
          teamId,
          project,
        }) => {
          const { token, apiBase } = resolveProject(project);
          const updateData: Record<string, unknown> = {};
    
          if (status !== undefined) updateData.status = status;
          if (level !== undefined) updateData.level = level;
          if (title !== undefined) updateData.title = title;
          if (assignedUserId !== undefined)
            updateData.assigned_user_id = assignedUserId;
          if (resolvedInVersion !== undefined)
            updateData.resolved_in_version = resolvedInVersion;
          if (snoozed !== undefined) updateData.snoozed = snoozed;
          if (teamId !== undefined) updateData.team_id = teamId;
    
          if (Object.keys(updateData).length === 0) {
            throw new Error("At least one field must be provided to update");
          }
    
          const url = `${apiBase}/item/${itemId}`;
          const response = await makeRollbarRequest<RollbarApiResponse<unknown>>(
            url,
            "update-item",
            token,
            {
              method: "PATCH",
              headers: {
                "Content-Type": "application/json",
              },
              body: JSON.stringify(updateData),
            },
          );
    
          if (response.err !== 0) {
            const errorMessage =
              response.message || `Unknown error (code: ${response.err})`;
            throw new Error(`Rollbar API returned error: ${errorMessage}`);
          }
    
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify(response.result),
              },
            ],
          };
        },
      );
    }

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