Skip to main content
Glama

Update Item

update_item

Update specific fields on an existing Codebeamer work item by providing only the fields to change. Returns the complete updated item.

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. Takes itemId and optional fields, builds a CbUpdateItemRequest, and calls client.updateItem(). Returns formatted item content.
    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) }] };
    },
  • Input schema for the update_item tool defining all optional fields (itemId required, name, description, statusId, priorityId, assignedToIds, storyPoints optional).
    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"),
    },
  • Registration of the update_item tool via server.registerTool(). The tool is registered inside registerItemWriteTools().
    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 client method updateItem() that sends the PUT request to /items/{itemId} with the request data.
    updateItem(itemId: number, data: CbUpdateItemRequest): Promise<CbItem> {
      return this.http.put(`/items/${itemId}`, {
        body: data,
        resource: `update item ${itemId}`,
      });
    }
  • Type definition for the CbUpdateItemRequest interface with all optional fields: name, description, status, priority, assignedTo, storyPoints, customFields.
    export interface CbUpdateItemRequest {
      name?: string;
      description?: string;
      status?: { id: number; type?: string };
      priority?: { id: number };
      assignedTo?: Array<{ id: number }>;
      storyPoints?: number;
      customFields?: Array<{ fieldId: number; type: string; values?: Array<{ id: number; type: string }>; value?: unknown }>;
    }
Behavior3/5

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

No annotations provided, so description carries full burden. It discloses that it updates fields and returns the item, but does not cover authorization, rate limits, or side effects. Adequate for a simple update operation.

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?

Two sentences, front-loaded with the main action, no unnecessary words. Efficient and clear.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema, but description states it returns updated item with all fields. Parameter count is moderate and fully documented. For a simple update tool, the description covers all needed information.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has 100% description coverage for parameters. Description adds value by explaining the partial update pattern, which is not explicit in the schema alone.

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

Purpose5/5

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

Description clearly states it updates an existing work item, supports partial updates, and returns the updated item. Distinguishes from create_item (creates new) and get_item (reads).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Includes guidance on partial updates ('Only provide the fields you want to change'). Does not explicitly list alternatives or when-not-to-use, but the sibling context implicitly provides differentiation.

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

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