update_test_plan
Update test plan priority and custom fields to maintain accurate metadata and align with evolving project needs.
Instructions
Update a test plan's priority or custom fields. Returns 204 on success.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Test plan ID | |
| priority | No | ||
| customFields | No |
Implementation Reference
- src/index.ts:555-558 (handler)The callback/handler function that executes the update_test_plan tool logic. It sends a PUT request to /testplans/:id with the priority and/or customFields payload.
async ({ id, ...rest }) => { await qtmFetch(`/testplans/${id}`, { method: "PUT", body: JSON.stringify(rest) }); return ok({ message: `Test plan ${id} updated` }); } - src/index.ts:550-554 (schema)Input schema for update_test_plan: accepts id (string|number), optional priority (string), optional customFields (array of CustomField objects).
{ id: ID.describe("Test plan ID"), priority: z.string().optional(), customFields: z.array(CustomField).optional(), }, - src/index.ts:547-559 (registration)Registration of the tool named 'update_test_plan' via the `tool()` wrapper (which internally calls server.registerTool). The description explains it updates a test plan's priority or custom fields, returning 204 on success.
tool( "update_test_plan", "Update a test plan's priority or custom fields. Returns 204 on success.", { id: ID.describe("Test plan ID"), priority: z.string().optional(), customFields: z.array(CustomField).optional(), }, async ({ id, ...rest }) => { await qtmFetch(`/testplans/${id}`, { method: "PUT", body: JSON.stringify(rest) }); return ok({ message: `Test plan ${id} updated` }); } ); - src/index.ts:138-142 (helper)The CustomField Zod schema used by update_test_plan's input schema and many other tools.
const CustomField = z.object({ id: z.string().describe("Custom field ID, e.g. qcf_1"), value: z.string().optional().describe("Field value"), cascadeValue: z.string().optional().describe("Cascade dropdown value"), }); - src/index.ts:172-184 (helper)The `tool()` wrapper function that registers the tool on the MCP server. Used by update_test_plan.
const tool = <Shape extends z.ZodRawShape>( name: string, description: string, inputSchema: Shape, // eslint-disable-next-line @typescript-eslint/no-explicit-any callback: (args: z.infer<z.ZodObject<Shape>>) => Promise<any> ) => server.registerTool( name, { description, inputSchema }, // eslint-disable-next-line @typescript-eslint/no-explicit-any callback as any );