Skip to main content
Glama

Get Item References

get_item_references

Retrieve upstream and downstream traceability references for a Codebeamer item to understand its source and derived items.

Instructions

Get upstream and downstream traceability references for a Codebeamer item. Upstream references point to items this one is derived from (e.g. requirements). Downstream references point to items derived from this one (e.g. test cases).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemIdYesNumeric item ID

Implementation Reference

  • The tool 'get_item_references' is registered via server.registerTool() with input schema (itemId: number) and a handler that calls client.getItemRelations then formatReferences.
    server.registerTool(
      "get_item_references",
      {
        title: "Get Item References",
        description:
          "Get upstream and downstream traceability references for a Codebeamer item. " +
          "Upstream references point to items this one is derived from (e.g. requirements). " +
          "Downstream references point to items derived from this one (e.g. test cases).",
        inputSchema: {
          itemId: z
            .number()
            .int()
            .positive()
            .describe("Numeric item ID"),
        },
      },
      async ({ itemId }) => {
        const page = await client.getItemRelations(itemId);
        return { content: [{ type: "text", text: formatReferences(page) }] };
      },
    );
  • The handler function for 'get_item_references' - calls client.getItemRelations(itemId) to fetch the relations page, then passes it to formatReferences() for display.
    async ({ itemId }) => {
      const page = await client.getItemRelations(itemId);
      return { content: [{ type: "text", text: formatReferences(page) }] };
    },
  • Input schema for 'get_item_references' - expects a single 'itemId' parameter: a positive integer (Zod schema).
    {
      title: "Get Item References",
      description:
        "Get upstream and downstream traceability references for a Codebeamer item. " +
        "Upstream references point to items this one is derived from (e.g. requirements). " +
        "Downstream references point to items derived from this one (e.g. test cases).",
      inputSchema: {
        itemId: z
          .number()
          .int()
          .positive()
          .describe("Numeric item ID"),
      },
  • formatReferences() helper function - formats upstream and downstream references into a Markdown table using the shared relationsTable() utility.
    export function formatReferences(page: CbItemRelationsPage): string {
      const upstream = page.upstreamReferences ?? [];
      const downstream = page.downstreamReferences ?? [];
      const total = upstream.length + downstream.length;
    
      if (total === 0) return "_No references found._";
    
      const lines: string[] = [`## References (${total})`];
    
      if (upstream.length > 0) {
        lines.push("", `### Upstream (${upstream.length})`, "", ...relationsTable(upstream));
      }
      if (downstream.length > 0) {
        lines.push("", `### Downstream (${downstream.length})`, "", ...relationsTable(downstream));
      }
    
      return lines.join("\n");
    }
  • relationsTable() helper - shared utility used by formatReferences to render relations as a Markdown table with columns: Relation ID, Type, Target ID, Target Name.
    function relationsTable(relations: { id: number; type?: { name?: string }; itemRevision?: { id: number; name: string } }[]): string[] {
      const rows = relations.map(
        (r) => `| ${r.id} | ${r.type?.name ?? "?"} | ${r.itemRevision?.id ?? "?"} | ${r.itemRevision?.name ?? "?"} |`,
      );
      return [
        "| Relation ID | Type | Target ID | Target Name |",
        "|-------------|------|-----------|-------------|",
        ...rows,
      ];
Behavior3/5

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

No annotations provided, so description carries full burden. It states the tool is for reading references but does not disclose permissions, error behavior (e.g., empty list vs error), or whether itemId must be valid. Adequate for a simple query tool but could be more explicit.

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, front-loaded with action, no wasted words. Structured logically: action first, then explanation of upstream/downstream.

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?

Given one param, no output schema, and simple purpose, description is nearly complete. Could hint at return format (e.g., list of reference objects) or mention that references are traceability links, but overall sufficient.

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 the single param (itemId) with 100% description coverage. The tool description adds context about references but not additional param details. Baseline 3 applies as schema does the heavy lifting.

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 uses specific verb ('Get') and resource ('upstream and downstream traceability references') with clear differentiation from siblings like get_item_relations. Explains both reference types explicitly.

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 (when traceability info is needed) but no explicit when-not or alternatives despite siblings like get_item_relations existing. Context is clear but lacks exclusions.

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