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
| Name | Required | Description | Default |
|---|---|---|---|
| itemId | Yes | Numeric item ID |
Implementation Reference
- src/tools/item-details.ts:29-32 (handler)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) }] }; }, - src/tools/item-details.ts:14-33 (registration)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) }] }; }, ); - src/client/codebeamer-client.ts:275-279 (handler)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}`, }); }