Skip to main content
Glama

Get Item Comments

get_item_comments

Retrieve all comments in the discussion thread for a specific Codebeamer item by its numeric ID. Access the full conversation history to review collaboration and feedback.

Instructions

Get all comments (discussion thread) for a Codebeamer item.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemIdYesNumeric item ID

Implementation Reference

  • The tool handler for 'get_item_comments'. It calls client.getItemComments(itemId) and formats the result with formatComments().
    server.registerTool(
      "get_item_comments",
      {
        title: "Get Item Comments",
        description:
          "Get all comments (discussion thread) for a Codebeamer item.",
        inputSchema: {
          itemId: z
            .number()
            .int()
            .positive()
            .describe("Numeric item ID"),
        },
      },
      async ({ itemId }) => {
        const comments = await client.getItemComments(itemId);
        return { content: [{ type: "text", text: formatComments(comments) }] };
      },
    );
  • Input schema for 'get_item_comments' — requires a positive integer itemId.
    "get_item_comments",
    {
      title: "Get Item Comments",
      description:
        "Get all comments (discussion thread) for a Codebeamer item.",
      inputSchema: {
        itemId: z
          .number()
          .int()
          .positive()
          .describe("Numeric item ID"),
      },
    },
  • Tool registration via server.registerTool('get_item_comments', ...) inside registerItemDetailTools().
    server.registerTool(
      "get_item_comments",
      {
        title: "Get Item Comments",
        description:
          "Get all comments (discussion thread) for a Codebeamer item.",
        inputSchema: {
          itemId: z
            .number()
            .int()
            .positive()
            .describe("Numeric item ID"),
        },
      },
      async ({ itemId }) => {
        const comments = await client.getItemComments(itemId);
        return { content: [{ type: "text", text: formatComments(comments) }] };
      },
    );
  • The getItemComments() method on CodebeamerClient — fetches /items/{id}/comments and normalizes the response using toArray().
    async getItemComments(id: number): Promise<CbComment[]> {
      const raw = await this.http.get<unknown>(`/items/${id}/comments`, {
        resource: `comments for item ${id}`,
      });
      return toArray(raw);
    }
  • The formatComments() helper — formats CbComment[] into a Markdown string with author, date, and comment body.
    export function formatComments(comments: CbComment[]): string {
      if (comments.length === 0) return "_No comments found._";
    
      const formatted = comments.map(
        (c) =>
          `### ${c.createdBy?.name ?? "?"} — ${c.createdAt ?? ""}\n\n${c.comment ?? "_empty_"}`,
      );
    
      return [`## Comments (${comments.length})`, "", ...formatted].join("\n\n");
    }
Behavior3/5

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

With no annotations, the description must carry the behavioral burden. 'Get all comments' implies read-only, but there is no explicit statement about side effects, pagination, ordering, or limits. For a simple read operation, the description is adequate but lacks depth.

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?

The description is a single, front-loaded sentence with no extraneous words. It efficiently communicates purpose and resource.

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

Completeness3/5

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

Given the simple one-parameter interface and lack of output schema, the description is minimally complete. However, it omits details like output structure, pagination, and sorting behavior, which are not critical but would be helpful.

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?

The input schema fully describes the single parameter (itemId) with a clear description. The tool description adds no additional semantic value beyond what the schema already provides.

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?

The description clearly states the action (Get) and the resource (all comments for a Codebeamer item). It distinguishes from sibling tools like add_comment (which adds) and get_item (which retrieves the item itself).

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives such as get_item, get_item_details, or add_comment. There is no mention of prerequisites or typical use cases.

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