Skip to main content
Glama

Get Item Reviews

get_item_reviews

Retrieve all Review Hub reviews for a Codebeamer tracker item, including overall result, individual votes, and review configuration.

Instructions

Get all Review Hub reviews for a Codebeamer tracker item. Shows the overall review result (APPROVED/REJECTED/UNDECIDED), individual reviewer votes, and review configuration (required approvals/rejections).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemIdYesNumeric item ID

Implementation Reference

  • The actual handler function for the 'get_item_reviews' tool. It calls client.getItemReviews(itemId) and formats the result using formatReviews.
    async ({ itemId }) => {
      const reviews = await client.getItemReviews(itemId);
      return { content: [{ type: "text", text: formatReviews(reviews) }] };
    },
  • Registration and input schema for the 'get_item_reviews' tool. Defines the tool name, title, description, and input schema (requires itemId as a positive integer).
    server.registerTool(
      "get_item_reviews",
      {
        title: "Get Item Reviews",
        description:
          "Get all Review Hub reviews for a Codebeamer tracker item. " +
          "Shows the overall review result (APPROVED/REJECTED/UNDECIDED), " +
          "individual reviewer votes, and review configuration (required approvals/rejections).",
        inputSchema: {
          itemId: z
            .number()
            .int()
            .positive()
            .describe("Numeric item ID"),
        },
      },
  • The full server.registerTool call that registers the 'get_item_reviews' tool on the MCP server, including its schema and handler.
    server.registerTool(
      "get_item_reviews",
      {
        title: "Get Item Reviews",
        description:
          "Get all Review Hub reviews for a Codebeamer tracker item. " +
          "Shows the overall review result (APPROVED/REJECTED/UNDECIDED), " +
          "individual reviewer votes, and review configuration (required approvals/rejections).",
        inputSchema: {
          itemId: z
            .number()
            .int()
            .positive()
            .describe("Numeric item ID"),
        },
      },
      async ({ itemId }) => {
        const reviews = await client.getItemReviews(itemId);
        return { content: [{ type: "text", text: formatReviews(reviews) }] };
      },
    );
  • The formatReviews helper function that formats CbTrackerItemReview[] into a human-readable Markdown string, showing review results, config, and reviewer votes in a table.
    export function formatReviews(reviews: CbTrackerItemReview[]): string {
      if (reviews.length === 0) return "_No reviews found for this item._";
    
      const sections = reviews.map((review, idx) => {
        const result = review.result ?? "UNDECIDED";
        const resultEmoji = result === "APPROVED" ? "✅" : result === "REJECTED" ? "❌" : "⏳";
        const lines: string[] = [
          `### Review ${idx + 1} — ${resultEmoji} ${result}`,
          "",
        ];
    
        if (review.config) {
          const cfg = review.config;
          lines.push("**Config:**");
          if (cfg.requiredApprovals !== undefined) lines.push(`- Required approvals: ${cfg.requiredApprovals}`);
          if (cfg.requiredRejections !== undefined) lines.push(`- Required rejections: ${cfg.requiredRejections}`);
          if (cfg.requiredSignature) lines.push(`- Signature required: ${cfg.requiredSignature}`);
          if (cfg.roleRequired !== undefined) lines.push(`- Role required: ${cfg.roleRequired}`);
          lines.push("");
        }
    
        const reviewers = review.reviewers ?? [];
        if (reviewers.length > 0) {
          lines.push(`**Reviewers (${reviewers.length}):**`, "");
          lines.push("| Reviewer | Role | Decision | Reviewed At |");
          lines.push("|----------|------|----------|-------------|");
          for (const r of reviewers) {
            const user = r.user?.name ?? "?";
            const role = r.asRole?.name ?? "-";
            const decision = r.decision ?? "UNDECIDED";
            const at = r.reviewedAt ? r.reviewedAt.replace("T", " ").slice(0, 16) : "-";
            lines.push(`| ${user} | ${role} | ${decision} | ${at} |`);
          }
        } else {
          lines.push("_No reviewers assigned._");
        }
    
        return lines.join("\n");
      });
    
      return [`## Reviews (${reviews.length})`, "", ...sections].join("\n\n");
    }
  • The getItemReviews client method that calls the Codebeamer API (GET /items/{id}/reviews) to fetch all reviews for a tracker item.
    async getItemReviews(id: number): Promise<CbTrackerItemReview[]> {
      const raw = await this.http.get<unknown>(`/items/${id}/reviews`, {
        resource: `reviews for item ${id}`,
      });
      return Array.isArray(raw) ? raw : [];
    }
Behavior3/5

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

No annotations provided, so description carries full burden. Discloses read behavior and returned fields but lacks details on error handling, rate limits, or prerequisites beyond item existence.

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 with immediate purpose. Every word adds value, no redundancy. Effectively front-loaded.

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?

For a simple read tool with one parameter and no output schema, the description is sufficient. It explains what data the call returns. Minor gap: no mention of potential errors or empty results.

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 covers 100% of parameter details with a clear description. The tool description adds no extra semantic context beyond what the input 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?

Clearly states the tool retrieves all Review Hub reviews for a Codebeamer tracker item. Specifies the exact outputs: overall result, individual reviewer votes, and review configuration. Distinct from sibling tools like get_item_comments and get_item_details.

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

Usage Guidelines3/5

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

Implied usage for fetching reviews, but no explicit guidance on when to prefer this over similar tools like get_item_details. No mention of when not to use or 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