tdx-ticket-add-asset
Link an asset to a TDX ticket by specifying the ticket ID and asset ID to associate IT resources with service requests.
Instructions
Link an asset 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 | |
| assetId | Yes | Asset ID to link |
Implementation Reference
- src/tools/tickets.ts:196-213 (handler)The tdx-ticket-add-asset tool is defined and implemented directly within the server.tool call in src/tools/tickets.ts. It takes appId, id, and assetId as parameters and performs a POST request to link the asset to the ticket.
server.tool( "tdx-ticket-add-asset", "Link an asset to a TDX ticket", { appId: z.number().optional().describe("TDX app ID (defaults to env TDX_APP_ID)"), id: z.number().describe("Ticket ID"), assetId: z.number().describe("Asset ID to link"), }, async (params) => { const app = params.appId ?? defaultAppId; try { const result = await client.post(`/${app}/tickets/${params.id}/assets/${params.assetId}`); return { content: [{ type: "text", text: JSON.stringify(result ?? "Asset linked successfully", null, 2) }] }; } catch (e: unknown) { return { content: [{ type: "text", text: String(e) }], isError: true }; } } );