Skip to main content
Glama

get_item_relations

Retrieve all associations for a Codebeamer item, including incoming and outgoing links such as 'depends on', 'blocks', and 'derived from' relationships.

Instructions

Get all relations (associations) for a Codebeamer item. Shows incoming and outgoing links like 'depends on', 'blocks', 'derived from', etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemIdYesNumeric item ID

Implementation Reference

  • The handler function for the `get_item_relations` tool calls the `client.getItemRelations` method.
    async ({ itemId }) => {
      const page = await client.getItemRelations(itemId);
      return { content: [{ type: "text", text: formatRelations(page) }] };
    },
  • Registration of the `get_item_relations` tool in the MCP server.
    server.registerTool(
      "get_item_relations",
      {
        title: "Get Item Relations",
        description:
          "Get all relations (associations) for a Codebeamer item. " +
          "Shows incoming and outgoing links like 'depends on', 'blocks', 'derived from', etc.",
        inputSchema: {
          itemId: z
            .number()
            .int()
            .positive()
            .describe("Numeric item ID"),
        },
      },
      async ({ itemId }) => {
        const page = await client.getItemRelations(itemId);
        return { content: [{ type: "text", text: formatRelations(page) }] };
      },
    );
  • The implementation of the `getItemRelations` method in the `CodebeamerClient` class, which makes the actual API call.
    getItemRelations(id: number): Promise<CbItemRelationsPage> {
      return this.http.get(`/items/${id}/relations`, {
        resource: `relations for item ${id}`,
      });
    }

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