Skip to main content
Glama
umzcio
by umzcio

tdx-kb-create

Create new knowledge base articles in TeamDynamix (TDX) by specifying category, subject, body, and optional metadata like status, tags, and custom attributes.

Instructions

Create a new TDX knowledge base article

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appIdNoTDX app ID (defaults to env TDX_APP_ID)
categoryIdYesKB category ID
subjectYesArticle subject/title
bodyYesArticle body (HTML)
summaryNoArticle summary
statusNoArticle status (0=None, 1=Draft, 2=Approved, 3=Archived)
orderNoSort order
reviewDateNoReview date (ISO)
ownerUidNoOwner person UID
ownerGroupIdNoOwner group ID
tagsNoTags
attributesNoCustom attributes

Implementation Reference

  • The handler function that executes the creation of a TDX knowledge base article.
    async (params) => {
      const app = params.appId ?? defaultAppId;
      const body: Record<string, unknown> = {
        CategoryID: params.categoryId,
        Subject: params.subject,
        Body: params.body,
      };
      if (params.summary !== undefined) body.Summary = params.summary;
      if (params.status !== undefined) body.Status = params.status;
      if (params.order !== undefined) body.Order = params.order;
      if (params.reviewDate !== undefined) body.ReviewDate = params.reviewDate;
      if (params.ownerUid !== undefined) body.OwnerUid = params.ownerUid;
      if (params.ownerGroupId !== undefined) body.OwnerGroupID = params.ownerGroupId;
      if (params.tags !== undefined) body.Tags = params.tags;
      if (params.attributes) {
        body.Attributes = params.attributes.map((a) => ({ ID: a.id, Value: String(a.value) }));
      }
      try {
        const result = await client.post(`/${app}/knowledgebase`, body);
        return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
      } catch (e: unknown) {
        return { content: [{ type: "text", text: String(e) }], isError: true };
      }
    }
  • Zod schema defining the input parameters for the tdx-kb-create tool.
    {
      appId: z.number().optional().describe("TDX app ID (defaults to env TDX_APP_ID)"),
      categoryId: z.number().describe("KB category ID"),
      subject: z.string().describe("Article subject/title"),
      body: z.string().describe("Article body (HTML)"),
      summary: z.string().optional().describe("Article summary"),
      status: z.number().optional().describe("Article status (0=None, 1=Draft, 2=Approved, 3=Archived)"),
      order: z.number().optional().describe("Sort order"),
      reviewDate: z.string().optional().describe("Review date (ISO)"),
      ownerUid: z.string().optional().describe("Owner person UID"),
      ownerGroupId: z.number().optional().describe("Owner group ID"),
      tags: z.array(z.string()).optional().describe("Tags"),
      attributes: z.array(z.object({
        id: z.number().describe("Custom attribute ID"),
        value: z.union([z.string(), z.number(), z.boolean()]).describe("Attribute value"),
      })).optional().describe("Custom attributes"),
    },
  • src/tools/kb.ts:8-52 (registration)
    Registration of the tdx-kb-create tool using server.tool().
    server.tool(
      "tdx-kb-create",
      "Create a new TDX knowledge base article",
      {
        appId: z.number().optional().describe("TDX app ID (defaults to env TDX_APP_ID)"),
        categoryId: z.number().describe("KB category ID"),
        subject: z.string().describe("Article subject/title"),
        body: z.string().describe("Article body (HTML)"),
        summary: z.string().optional().describe("Article summary"),
        status: z.number().optional().describe("Article status (0=None, 1=Draft, 2=Approved, 3=Archived)"),
        order: z.number().optional().describe("Sort order"),
        reviewDate: z.string().optional().describe("Review date (ISO)"),
        ownerUid: z.string().optional().describe("Owner person UID"),
        ownerGroupId: z.number().optional().describe("Owner group ID"),
        tags: z.array(z.string()).optional().describe("Tags"),
        attributes: z.array(z.object({
          id: z.number().describe("Custom attribute ID"),
          value: z.union([z.string(), z.number(), z.boolean()]).describe("Attribute value"),
        })).optional().describe("Custom attributes"),
      },
      async (params) => {
        const app = params.appId ?? defaultAppId;
        const body: Record<string, unknown> = {
          CategoryID: params.categoryId,
          Subject: params.subject,
          Body: params.body,
        };
        if (params.summary !== undefined) body.Summary = params.summary;
        if (params.status !== undefined) body.Status = params.status;
        if (params.order !== undefined) body.Order = params.order;
        if (params.reviewDate !== undefined) body.ReviewDate = params.reviewDate;
        if (params.ownerUid !== undefined) body.OwnerUid = params.ownerUid;
        if (params.ownerGroupId !== undefined) body.OwnerGroupID = params.ownerGroupId;
        if (params.tags !== undefined) body.Tags = params.tags;
        if (params.attributes) {
          body.Attributes = params.attributes.map((a) => ({ ID: a.id, Value: String(a.value) }));
        }
        try {
          const result = await client.post(`/${app}/knowledgebase`, body);
          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