Skip to main content
Glama

create_reference

Add downstream references between Codebeamer items to establish derivation and traceability links, such as connecting requirements to their source items.

Instructions

Add a downstream reference from one Codebeamer item to another. Downstream references represent derivation/traceability links (e.g. a requirement derived from another). The 'from' item gets the downstream reference pointing to the 'to' item.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromItemIdYesItem ID that will have the downstream reference added
toItemIdYesItem ID to reference as downstream

Implementation Reference

  • The handler function for 'create_reference', which invokes the client's createDownstreamReference method.
    async ({ fromItemId, toItemId }) => {
      await client.createDownstreamReference(fromItemId, toItemId);
      const text =
        `**Downstream reference created**\n\n` +
        `| Field | Value |\n|---|---|\n` +
        `| Upstream (from) | #${fromItemId} |\n` +
        `| Downstream (to) | #${toItemId} |`;
      return { content: [{ type: "text", text }] };
    },
  • The schema definition for the 'create_reference' tool inputs.
    {
      title: "Create Downstream Reference",
      description:
        "Add a downstream reference from one Codebeamer item to another. " +
        "Downstream references represent derivation/traceability links (e.g. a requirement derived from another). " +
        "The 'from' item gets the downstream reference pointing to the 'to' item.",
      inputSchema: {
        fromItemId: z
          .number()
          .int()
          .positive()
          .describe("Item ID that will have the downstream reference added"),
        toItemId: z
          .number()
          .int()
          .positive()
          .describe("Item ID to reference as downstream"),
      },
    },
  • The registration of the 'create_reference' tool in the MCP server.
    server.registerTool(
      "create_reference",
      {
        title: "Create Downstream Reference",
        description:
          "Add a downstream reference from one Codebeamer item to another. " +
          "Downstream references represent derivation/traceability links (e.g. a requirement derived from another). " +
          "The 'from' item gets the downstream reference pointing to the 'to' item.",
        inputSchema: {
          fromItemId: z
            .number()
            .int()
            .positive()
            .describe("Item ID that will have the downstream reference added"),
          toItemId: z
            .number()
            .int()
            .positive()
            .describe("Item ID to reference as downstream"),
        },
      },
      async ({ fromItemId, toItemId }) => {
        await client.createDownstreamReference(fromItemId, toItemId);
        const text =
          `**Downstream reference created**\n\n` +
          `| Field | Value |\n|---|---|\n` +
          `| Upstream (from) | #${fromItemId} |\n` +
          `| Downstream (to) | #${toItemId} |`;
        return { content: [{ type: "text", text }] };
      },
    );

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