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
| Name | Required | Description | Default |
|---|---|---|---|
| itemId | Yes | The ID of the item to update | |
| status | No | The new status for the item | |
| level | No | The new level for the item | |
| title | No | The new title for the item | |
| assignedUserId | No | The ID of the user to assign the item to | |
| resolvedInVersion | No | The version in which the item was resolved | |
| snoozed | No | Whether the item should be snoozed (paid accounts only) | |
| teamId | No | The ID of the team to assign as owner (Advanced/Enterprise accounts only) | |
| project | No | Project name (optional when only one project is configured) |
Implementation Reference
- src/tools/update-item.ts:8-103 (handler)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), }, ], }; }, ); }