Skip to main content
Glama

create_item

Create new work items in Codebeamer trackers by specifying tracker ID, name, description, status, priority, assignments, and other fields. Use get_tracker to discover available options before creating items.

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

  • Registration of the "create_item" tool with its input schema definition.
    server.registerTool(
      "create_item",
      {
        title: "Create Item",
        description:
          "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.",
        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)"),
        },
      },
  • The handler function for "create_item" which prepares the request data and calls the client.
    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) }] };
    },

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