Skip to main content
Glama

Get Tracker

get_tracker

Retrieve a Codebeamer tracker's details and field schema to construct cbQL queries for items in that tracker.

Instructions

Get details of a Codebeamer tracker including its field schema. The field list shows what fields are available for items in this tracker, useful for constructing cbQL queries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
trackerIdYesNumeric tracker ID

Implementation Reference

  • Handler/execution function for the get_tracker tool. It fetches tracker details, fields, and items in parallel, then formats the output.
    async ({ trackerId }) => {
      const [tracker, fields, { items }] = await Promise.all([
        client.getTracker(trackerId),
        client.getTrackerFields(trackerId),
        client.listTrackerItems(trackerId, 1, 100),
      ]);
      return {
        content: [{ type: "text", text: formatTracker(tracker, fields, items) }],
      };
    },
  • Input schema for get_tracker: takes a single 'trackerId' (positive integer) parameter.
    {
      title: "Get Tracker",
      description:
        "Get details of a Codebeamer tracker including its field schema. " +
        "The field list shows what fields are available for items in this tracker, " +
        "useful for constructing cbQL queries.",
      inputSchema: {
        trackerId: z
          .number()
          .int()
          .positive()
          .describe("Numeric tracker ID"),
      },
  • Registration of the 'get_tracker' tool via server.registerTool() within registerTrackerTools().
    server.registerTool(
      "get_tracker",
      {
        title: "Get Tracker",
        description:
          "Get details of a Codebeamer tracker including its field schema. " +
          "The field list shows what fields are available for items in this tracker, " +
          "useful for constructing cbQL queries.",
        inputSchema: {
          trackerId: z
            .number()
            .int()
            .positive()
            .describe("Numeric tracker ID"),
        },
      },
      async ({ trackerId }) => {
        const [tracker, fields, { items }] = await Promise.all([
          client.getTracker(trackerId),
          client.getTrackerFields(trackerId),
          client.listTrackerItems(trackerId, 1, 100),
        ]);
        return {
          content: [{ type: "text", text: formatTracker(tracker, fields, items) }],
        };
      },
    );
  • Client method getTracker() that makes the HTTP GET request to /trackers/{id}.
    getTracker(id: number): Promise<CbTracker> {
      return this.http.get(`/trackers/${id}`, { resource: `tracker ${id}` });
    }
  • formatTracker() helper function that formats the tracker details, fields, and items into a Markdown string.
    export function formatTracker(
      tracker: CbTracker,
      fields: CbTrackerField[],
      items: CbItem[] = [],
    ): string {
      const lines: string[] = [
        `## ${tracker.name}`,
        "",
        `- **ID:** ${tracker.id}`,
        `- **Type:** ${tracker.type?.name ?? "?"}`,
        `- **Project:** ${tracker.project?.name ?? "?"} (ID: ${tracker.project?.id ?? "?"})`,
      ];
    
      if (tracker.keyName) {
        lines.push(`- **Key:** ${tracker.keyName}`);
      }
      if (tracker.description) {
        lines.push("", "### Description", "", tracker.description);
      }
    
      if (fields.length > 0) {
        const visibleFields = fields.filter((f) => !f.hidden);
        lines.push("", "### Fields", "");
        lines.push("| ID | Name | Type | Required |");
        lines.push("|----|------|------|----------|");
        for (const f of visibleFields) {
          lines.push(
            `| ${f.fieldId} | ${f.name} | ${f.type ?? "-"} | ${f.required ? "Yes" : "No"} |`,
          );
        }
      }
    
      if (items.length > 0) {
        lines.push("", `### Items (${items.length})`, "");
        lines.push("| ID | Name | Status | Type | Description |");
        lines.push("|----|------|--------|------|-------------|");
        for (const item of items) {
          const desc = extractDescription(item.description);
          lines.push(
            `| ${item.id} | ${item.name} | ${item.status?.name ?? "-"} | ${item.tracker?.type ?? tracker.type?.name ?? "-"} | ${desc} |`,
          );
        }
      }
    
      return lines.join("\n");
    }
Behavior3/5

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

No annotations provided; description implies a read operation but does not disclose behavioral traits like authentication requirements or performance characteristics.

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 no redundancy; front-loaded with the main action and efficient.

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 single-parameter read tool without output schema or annotations, the description is sufficiently complete, covering purpose and a common use case.

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 description; the tool description adds little beyond schema, confirming trackerId is numeric.

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 it gets tracker details and its field schema, differentiating from sibling tools like get_item and list_trackers. It includes a specific verb and resource.

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?

The description mentions usefulness for constructing cbQL queries but does not explicitly state when to use this tool vs alternatives or when not to use it.

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