tdx-project-create
Create a new TDX project with essential details like name, description, dates, budget, and custom attributes for IT service management.
Instructions
Create a new TDX project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Project name | |
| description | No | Project description | |
| accountId | No | Account/department ID | |
| priorityId | No | Priority ID | |
| statusId | No | Status ID | |
| managerId | No | Project manager UID | |
| startDate | No | Start date (ISO) | |
| endDate | No | End date (ISO) | |
| budgetedHours | No | Budgeted hours | |
| estimatedHours | No | Estimated hours | |
| attributes | No | Custom attributes |
Implementation Reference
- src/tools/projects.ts:6-24 (registration)Registration and schema definition for 'tdx-project-create'.
server.tool( "tdx-project-create", "Create a new TDX project", { name: z.string().describe("Project name"), description: z.string().optional().describe("Project description"), accountId: z.number().optional().describe("Account/department ID"), priorityId: z.number().optional().describe("Priority ID"), statusId: z.number().optional().describe("Status ID"), managerId: z.string().optional().describe("Project manager UID"), startDate: z.string().optional().describe("Start date (ISO)"), endDate: z.string().optional().describe("End date (ISO)"), budgetedHours: z.number().optional().describe("Budgeted hours"), estimatedHours: z.number().optional().describe("Estimated hours"), 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/projects.ts:25-47 (handler)Handler function logic for 'tdx-project-create'.
async (params) => { const body: Record<string, unknown> = { Name: params.name, }; if (params.description !== undefined) body.Description = params.description; if (params.accountId !== undefined) body.AccountID = params.accountId; if (params.priorityId !== undefined) body.PriorityID = params.priorityId; if (params.statusId !== undefined) body.StatusID = params.statusId; if (params.managerId !== undefined) body.ManagerUID = params.managerId; if (params.startDate !== undefined) body.StartDate = params.startDate; if (params.endDate !== undefined) body.EndDate = params.endDate; if (params.budgetedHours !== undefined) body.BudgetedHours = params.budgetedHours; if (params.estimatedHours !== undefined) body.EstimatedHours = params.estimatedHours; if (params.attributes) { body.Attributes = params.attributes.map((a) => ({ ID: a.id, Value: String(a.value) })); } try { const result = await client.post("/projects", body); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (e: unknown) { return { content: [{ type: "text", text: String(e) }], isError: true }; } }