Skip to main content
Glama

update_item

Modify existing Codebeamer work items by updating specific fields like title, description, status, priority, assignments, or story points.

Instructions

Update fields on an existing Codebeamer work item. Only provide the fields you want to change. Returns the updated item with all fields.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemIdYesNumeric item ID to update
nameNoNew summary / title
descriptionNoNew description (plain text or wiki markup)
statusIdNoNew status ID
priorityIdNoNew priority ID
assignedToIdsNoNew array of assigned user IDs (replaces current)
storyPointsNoNew story points estimate

Implementation Reference

  • The handler function for the update_item tool, which prepares the request data and calls client.updateItem.
    async ({ itemId, name, description, statusId, priorityId, assignedToIds, storyPoints }) => {
      const data: CbUpdateItemRequest = {};
      if (name !== undefined) data.name = name;
      if (description !== undefined) data.description = description;
      if (statusId !== undefined) data.status = { id: statusId };
      if (priorityId !== undefined) data.priority = { id: priorityId };
      if (assignedToIds !== undefined) data.assignedTo = assignedToIds.map((id) => ({ id }));
      if (storyPoints !== undefined) data.storyPoints = storyPoints;
    
      const item = await client.updateItem(itemId, data);
      return { content: [{ type: "text", text: formatItem(item) }] };
    },
  • The registration of the update_item tool using the MCP server instance.
    server.registerTool(
      "update_item",
      {
        title: "Update Item",
        description:
          "Update fields on an existing Codebeamer work item. " +
          "Only provide the fields you want to change. " +
          "Returns the updated item with all fields.",
        inputSchema: {
          itemId: z
            .number()
            .int()
            .positive()
            .describe("Numeric item ID to update"),
          name: z.string().min(1).optional().describe("New summary / title"),
          description: z
            .string()
            .optional()
            .describe("New description (plain text or wiki markup)"),
          statusId: z
            .number()
            .int()
            .positive()
            .optional()
            .describe("New status ID"),
          priorityId: z
            .number()
            .int()
            .positive()
            .optional()
            .describe("New priority ID"),
          assignedToIds: z
            .array(z.number().int().positive())
            .optional()
            .describe("New array of assigned user IDs (replaces current)"),
          storyPoints: z
            .number()
            .int()
            .min(0)
            .optional()
            .describe("New story points estimate"),
        },
      },
      async ({ itemId, name, description, statusId, priorityId, assignedToIds, storyPoints }) => {
        const data: CbUpdateItemRequest = {};
        if (name !== undefined) data.name = name;
        if (description !== undefined) data.description = description;
        if (statusId !== undefined) data.status = { id: statusId };
        if (priorityId !== undefined) data.priority = { id: priorityId };
        if (assignedToIds !== undefined) data.assignedTo = assignedToIds.map((id) => ({ id }));
        if (storyPoints !== undefined) data.storyPoints = storyPoints;
    
        const item = await client.updateItem(itemId, data);
        return { content: [{ type: "text", text: formatItem(item) }] };
      },
    );
  • The zod input schema definition for the update_item tool.
    inputSchema: {
      itemId: z
        .number()
        .int()
        .positive()
        .describe("Numeric item ID to update"),
      name: z.string().min(1).optional().describe("New summary / title"),
      description: z
        .string()
        .optional()
        .describe("New description (plain text or wiki markup)"),
      statusId: z
        .number()
        .int()
        .positive()
        .optional()
        .describe("New status ID"),
      priorityId: z
        .number()
        .int()
        .positive()
        .optional()
        .describe("New priority ID"),
      assignedToIds: z
        .array(z.number().int().positive())
        .optional()
        .describe("New array of assigned user IDs (replaces current)"),
      storyPoints: z
        .number()
        .int()
        .min(0)
        .optional()
        .describe("New story points estimate"),
    },

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/3KniGHtcZ/codebeamer-mcp'

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