Skip to main content
Glama

Create Item

create_item

Create a work item in a Codebeamer tracker. Use get_tracker to discover fields and statuses, then specify tracker ID and item name.

Instructions

Create a new work item in a Codebeamer tracker. Use get_tracker to discover available fields, statuses, and priorities. Returns the created item with all fields.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
trackerIdYesNumeric tracker ID to create the item in
nameYesItem summary / title
descriptionNoItem description (plain text or wiki markup)
statusIdNoStatus ID (use get_tracker to see available statuses)
priorityIdNoPriority ID (use get_tracker to see available priorities)
assignedToIdsNoArray of user IDs to assign
storyPointsNoStory points estimate
isFolderNoSet to true to create a folder item instead of a regular item
itemTypeNameNoItem type name as configured in the tracker (e.g. 'Folder', 'Informative'). Overrides isFolder.
parentIdNoParent item ID to nest this item inside (e.g. a folder)

Implementation Reference

  • Tool registration: 'create_item' is registered with the MCP server via server.registerTool() in registerItemWriteTools(). The registration call lives at line 14-91.
    server.registerTool(
      "create_item",
  • Input schema for 'create_item' using Zod definitions. Defines trackerId (required), name (required), and optionals: description, statusId, priorityId, assignedToIds, storyPoints, isFolder, itemTypeName, parentId.
    inputSchema: {
      trackerId: z
        .number()
        .int()
        .positive()
        .describe("Numeric tracker ID to create the item in"),
      name: z.string().min(1).describe("Item summary / title"),
      description: z
        .string()
        .optional()
        .describe("Item description (plain text or wiki markup)"),
      statusId: z
        .number()
        .int()
        .positive()
        .optional()
        .describe("Status ID (use get_tracker to see available statuses)"),
      priorityId: z
        .number()
        .int()
        .positive()
        .optional()
        .describe("Priority ID (use get_tracker to see available priorities)"),
      assignedToIds: z
        .array(z.number().int().positive())
        .optional()
        .describe("Array of user IDs to assign"),
      storyPoints: z
        .number()
        .int()
        .min(0)
        .optional()
        .describe("Story points estimate"),
      isFolder: z
        .boolean()
        .optional()
        .describe("Set to true to create a folder item instead of a regular item"),
      itemTypeName: z
        .string()
        .optional()
        .describe("Item type name as configured in the tracker (e.g. 'Folder', 'Informative'). Overrides isFolder."),
      parentId: z
        .number()
        .int()
        .positive()
        .optional()
        .describe("Parent item ID to nest this item inside (e.g. a folder)"),
    },
  • Handler function for 'create_item'. Builds a CbCreateItemRequest object from the input parameters (optionally fetching the tracker schema to resolve item type), calls client.createItem(), and formats the result.
    async ({ trackerId, name, description, statusId, priorityId, assignedToIds, storyPoints, isFolder, itemTypeName, parentId }) => {
      const data: CbCreateItemRequest = { name };
      const desiredType = itemTypeName ?? (isFolder ? "Folder" : undefined);
      if (desiredType) {
        const schema = await client.getTrackerSchema(trackerId);
        const typeField = schema.find((f) => f.trackerItemField === "categories" || f.legacyRestName === "type");
        const option = typeField?.options?.find((o) => o.name.toLowerCase() === desiredType.toLowerCase());
        if (option) {
          data.categories = [{ id: option.id, type: "ChoiceOptionReference" }];
        }
      }
      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.createItem(trackerId, data, parentId);
      return { content: [{ type: "text", text: formatItem(item) }] };
    },
  • Request type CbCreateItemRequest defines the data shape sent to the API when creating an item.
    export interface CbCreateItemRequest {
      name: string;
      description?: string;
      categories?: Array<{ id: number; type: string }>;
      status?: { id: number };
      priority?: { id: number };
      assignedTo?: Array<{ id: number }>;
      storyPoints?: number;
      customFields?: Array<{ fieldId: number; type: string; value: unknown }>;
    }
  • Client method that sends the POST request to /trackers/{trackerId}/items with optional parentItemId query parameter.
    createItem(trackerId: number, data: CbCreateItemRequest, parentId?: number): Promise<CbItem> {
      return this.http.post(`/trackers/${trackerId}/items`, {
        params: parentId !== undefined ? { parentItemId: parentId } : undefined,
        body: data,
        resource: `create item in tracker ${trackerId}`,
      });
    }
Behavior3/5

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

States that it returns the created item with all fields, but lacks details on error conditions, authorization requirements, or rate limits. No annotations exist to supplement.

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 concise sentences: first defines purpose, second provides guidance and output description. No extraneous words.

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

Completeness4/5

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

References get_tracker for field discovery, explains output, but does not discuss required vs optional parameters beyond schema or potential conflicts like isFolder vs itemTypeName.

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?

Schema provides 100% coverage of parameter descriptions, so the description adds minimal new meaning beyond advising use of get_tracker for status/priority discovery.

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?

Clearly states 'Create a new work item in a Codebeamer tracker' with a specific verb and resource, distinguishing it from siblings like update_item or get_item.

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?

Explicitly suggests using get_tracker to discover available fields, statuses, and priorities, but does not mention when to avoid this tool or provide direct alternatives.

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