tdx-ticket-add-contact
Add a person as a contact to a TeamDynamix (TDX) ticket for improved communication and collaboration in IT service management workflows.
Instructions
Add a contact to a TDX ticket
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| appId | No | TDX app ID (defaults to env TDX_APP_ID) | |
| id | Yes | Ticket ID | |
| uid | Yes | Person UID to add as contact |
Implementation Reference
- src/tools/tickets.ts:215-232 (handler)Implementation of the 'tdx-ticket-add-contact' tool. It is registered within `registerTicketTools` and defines the input schema (appId, id, uid) and uses the `client.post` method to add a contact to a TDX ticket.
server.tool( "tdx-ticket-add-contact", "Add a contact to a TDX ticket", { appId: z.number().optional().describe("TDX app ID (defaults to env TDX_APP_ID)"), id: z.number().describe("Ticket ID"), uid: z.string().describe("Person UID to add as contact"), }, async (params) => { const app = params.appId ?? defaultAppId; try { const result = await client.post(`/${app}/tickets/${params.id}/contacts/${params.uid}`); return { content: [{ type: "text", text: JSON.stringify(result ?? "Contact added successfully", null, 2) }] }; } catch (e: unknown) { return { content: [{ type: "text", text: String(e) }], isError: true }; } } );