remove_tests_from_test_plan
Remove specific tests from an existing test plan by providing test issue IDs, streamlining test management and maintaining accurate test coverage.
Instructions
Remove tests from an existing test plan
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| testPlanIssueId | Yes | The test plan issue ID (not key) | |
| testIssueIds | Yes | Array of test issue IDs to remove |
Implementation Reference
- src/xray-client.ts:749-766 (handler)Core handler implementing the tool logic: executes GraphQL mutation to remove specified test issue IDs from a test plan using Xray Cloud API.async removeTestsFromTestPlan(testPlanIssueId: string, testIssueIds: string[]): Promise<any> { const mutation = ` mutation RemoveTestsFromTestPlan($issueId: String!, $testIssueIds: [String]!) { removeTestsFromTestPlan(issueId: $issueId, testIssueIds: $testIssueIds) { removedTests warning } } `; const variables = { issueId: testPlanIssueId, testIssueIds }; const result = await this.graphqlRequest<{ removeTestsFromTestPlan: any }>(mutation, variables); return result.removeTestsFromTestPlan; }
- src/index.ts:369-383 (schema)Input schema defining parameters for the tool: testPlanIssueId (string) and testIssueIds (array of strings).inputSchema: { type: 'object', properties: { testPlanIssueId: { type: 'string', description: 'The test plan issue ID (not key)', }, testIssueIds: { type: 'array', items: { type: 'string' }, description: 'Array of test issue IDs to remove', }, }, required: ['testPlanIssueId', 'testIssueIds'], },
- src/index.ts:366-384 (registration)Tool registration in the MCP tools list, including name, description, and schema.{ name: 'remove_tests_from_test_plan', description: 'Remove tests from an existing test plan', inputSchema: { type: 'object', properties: { testPlanIssueId: { type: 'string', description: 'The test plan issue ID (not key)', }, testIssueIds: { type: 'array', items: { type: 'string' }, description: 'Array of test issue IDs to remove', }, }, required: ['testPlanIssueId', 'testIssueIds'], }, },
- src/index.ts:780-793 (registration)Dispatch handler in the MCP CallToolRequest that invokes the XrayClient method and formats the response.case 'remove_tests_from_test_plan': { const result = await xrayClient.removeTestsFromTestPlan( args.testPlanIssueId as string, args.testIssueIds as string[] ); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }