Skip to main content
Glama
umzcio
by umzcio

tdx-attributes-get

Retrieve custom attribute definitions for TDX components like tickets, assets, or CIs to enable accurate data entry when creating or updating items with custom fields.

Instructions

Get custom attribute definitions for a TDX component (e.g. tickets, assets, CIs). Returns attribute IDs, names, types, and choices needed for creating/updating items with custom attributes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
componentIdYesComponent ID (e.g. 9=Ticket, 27=Asset, 63=CI, 39=KBArticle, 2=Project)
appIdNoTDX app ID (defaults to env TDX_APP_ID)
associatedTypeIdNoFilter by associated type ID

Implementation Reference

  • The handler function that executes the logic for the 'tdx-attributes-get' tool.
    async (params) => {
      const app = params.appId ?? client.appId;
      const query: Record<string, string> = {};
      if (params.associatedTypeId !== undefined) {
        query.associatedTypeId = String(params.associatedTypeId);
      }
      try {
        const result = await client.get(`/attributes/custom?componentId=${params.componentId}&appId=${app}`, query);
        return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
      } catch (e: unknown) {
        return { content: [{ type: "text", text: String(e) }], isError: true };
      }
    }
  • Input schema definition for the 'tdx-attributes-get' tool.
    {
      componentId: z.number().describe("Component ID (e.g. 9=Ticket, 27=Asset, 63=CI, 39=KBArticle, 2=Project)"),
      appId: z.number().optional().describe("TDX app ID (defaults to env TDX_APP_ID)"),
      associatedTypeId: z.number().optional().describe("Filter by associated type ID"),
    },
  • Registration of the 'tdx-attributes-get' tool on the MCP server.
    server.tool(
      "tdx-attributes-get",
      "Get custom attribute definitions for a TDX component (e.g. tickets, assets, CIs). Returns attribute IDs, names, types, and choices needed for creating/updating items with custom attributes.",
      {
        componentId: z.number().describe("Component ID (e.g. 9=Ticket, 27=Asset, 63=CI, 39=KBArticle, 2=Project)"),
        appId: z.number().optional().describe("TDX app ID (defaults to env TDX_APP_ID)"),
        associatedTypeId: z.number().optional().describe("Filter by associated type ID"),
      },
      async (params) => {
        const app = params.appId ?? client.appId;
        const query: Record<string, string> = {};
        if (params.associatedTypeId !== undefined) {
          query.associatedTypeId = String(params.associatedTypeId);
        }
        try {
          const result = await client.get(`/attributes/custom?componentId=${params.componentId}&appId=${app}`, query);
          return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
        } catch (e: unknown) {
          return { content: [{ type: "text", text: String(e) }], isError: true };
        }
      }
    );

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