unlink_test_cycles_from_plan
Unlink specified test cycles from a test plan. Provide the test plan ID and an array of test cycle IDs. The cycles remain intact. Returns 204 on successful removal.
Instructions
Remove the link between one or more test cycles and a test plan. Does not delete the cycles themselves. Returns 204 on success.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Test plan ID | |
| testcycleIds | Yes | Test cycle IDs to unlink |
Implementation Reference
- src/index.ts:603-617 (registration)Tool registration via the `tool()` wrapper (which calls `server.registerTool`). Registers 'unlink_test_cycles_from_plan' with name, description, input schema, and handler callback.
tool( "unlink_test_cycles_from_plan", "Remove the link between one or more test cycles and a test plan. Does not delete the cycles themselves. Returns 204 on success.", { id: ID.describe("Test plan ID"), testcycleIds: z.array(z.number().int()).describe("Test cycle IDs to unlink"), }, async ({ id, testcycleIds }) => { await qtmFetch(`/testplans/${id}/testcycles`, { method: "DELETE", body: JSON.stringify({ testcycleIds }), }); return ok({ message: `Test cycles unlinked from plan ${id}` }); } ); - src/index.ts:610-616 (handler)The handler function that executes the tool logic. It sends a DELETE request to /testplans/{id}/testcycles with the test cycle IDs to unlink, then returns a success message.
async ({ id, testcycleIds }) => { await qtmFetch(`/testplans/${id}/testcycles`, { method: "DELETE", body: JSON.stringify({ testcycleIds }), }); return ok({ message: `Test cycles unlinked from plan ${id}` }); } - src/index.ts:606-609 (schema)Input schema for the tool: 'id' (test plan ID, string or number) and 'testcycleIds' (array of integers).
{ id: ID.describe("Test plan ID"), testcycleIds: z.array(z.number().int()).describe("Test cycle IDs to unlink"), },