Skip to main content
Glama
umzcio
by umzcio

tdx-cmdb-add-relationship

Create connections between configuration items in TDX CMDB by specifying source, target, and relationship type IDs.

Instructions

Add a relationship between two TDX configuration items

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appIdNoTDX app ID (defaults to env TDX_APP_ID)
idYesSource CI ID
otherItemIdYesTarget CI ID
typeIdYesRelationship type ID
isInverseNoWhether this is an inverse relationship

Implementation Reference

  • The handler function for tdx-cmdb-add-relationship, which sends a PUT request to the TDX API to create a relationship.
    async (params) => {
      const app = params.appId ?? defaultAppId;
      const body: Record<string, unknown> = {
        OtherItemID: params.otherItemId,
        TypeID: params.typeId,
      };
      if (params.isInverse !== undefined) body.IsInverse = params.isInverse;
      try {
        const result = await client.put(`/${app}/cmdb/${params.id}/relationships`, body);
        return { content: [{ type: "text", text: JSON.stringify(result ?? "Relationship added successfully", null, 2) }] };
      } catch (e: unknown) {
        return { content: [{ type: "text", text: String(e) }], isError: true };
      }
    }
  • Registration of the tdx-cmdb-add-relationship tool with its schema definition using Zod.
    server.tool(
      "tdx-cmdb-add-relationship",
      "Add a relationship between two TDX configuration items",
      {
        appId: z.number().optional().describe("TDX app ID (defaults to env TDX_APP_ID)"),
        id: z.number().describe("Source CI ID"),
        otherItemId: z.number().describe("Target CI ID"),
        typeId: z.number().describe("Relationship type ID"),
        isInverse: z.boolean().optional().describe("Whether this is an inverse relationship"),
      },

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/umzcio/TeamDynamix-MCP-Connector'

If you have feedback or need assistance with the MCP directory API, please join our Discord server