tdx-ticket-search
Search and filter TDX tickets using text queries, status, priority, type, account, and responsible person or group parameters to manage IT service requests.
Instructions
Search TDX tickets with filters
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| appId | No | TDX app ID (defaults to env TDX_APP_ID) | |
| searchText | No | Full-text search query | |
| statusIds | No | Filter by status IDs | |
| priorityIds | No | Filter by priority IDs | |
| typeIds | No | Filter by type IDs | |
| accountIds | No | Filter by account IDs | |
| responsibleUids | No | Filter by responsible person UIDs | |
| responsibleGroupIds | No | Filter by responsible group IDs | |
| requestorUids | No | Filter by requestor UIDs | |
| maxResults | No | Max results to return (default 25) |
Implementation Reference
- src/tools/tickets.ts:131-149 (handler)Handler function for the tdx-ticket-search tool, which constructs the search body and calls the TDX API.
async (params) => { const app = params.appId ?? defaultAppId; const body: Record<string, unknown> = {}; if (params.searchText !== undefined) body.SearchText = params.searchText; if (params.statusIds !== undefined) body.StatusIDs = params.statusIds; if (params.priorityIds !== undefined) body.PriorityIDs = params.priorityIds; if (params.typeIds !== undefined) body.TypeIDs = params.typeIds; if (params.accountIds !== undefined) body.AccountIDs = params.accountIds; if (params.responsibleUids !== undefined) body.ResponsibleUids = params.responsibleUids; if (params.responsibleGroupIds !== undefined) body.ResponsibleGroupIDs = params.responsibleGroupIds; if (params.requestorUids !== undefined) body.RequestorUids = params.requestorUids; if (params.maxResults !== undefined) body.MaxResults = params.maxResults; try { const result = await client.post(`/${app}/tickets/search`, body); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (e: unknown) { return { content: [{ type: "text", text: String(e) }], isError: true }; } } - src/tools/tickets.ts:116-130 (registration)Registration of the tdx-ticket-search tool including schema definition.
server.tool( "tdx-ticket-search", "Search TDX tickets with filters", { appId: z.number().optional().describe("TDX app ID (defaults to env TDX_APP_ID)"), searchText: z.string().optional().describe("Full-text search query"), statusIds: z.array(z.number()).optional().describe("Filter by status IDs"), priorityIds: z.array(z.number()).optional().describe("Filter by priority IDs"), typeIds: z.array(z.number()).optional().describe("Filter by type IDs"), accountIds: z.array(z.number()).optional().describe("Filter by account IDs"), responsibleUids: z.array(z.string()).optional().describe("Filter by responsible person UIDs"), responsibleGroupIds: z.array(z.number()).optional().describe("Filter by responsible group IDs"), requestorUids: z.array(z.string()).optional().describe("Filter by requestor UIDs"), maxResults: z.number().optional().describe("Max results to return (default 25)"), },