update_test_case
Modify existing test case details like summary, description, labels, or priority in Xray test management system to maintain accurate test documentation.
Instructions
Update an existing test case
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| testKey | Yes | The test case key (e.g., "PROJ-123") | |
| summary | No | New summary/title for the test case | |
| description | No | New description for the test case | |
| labels | No | New labels for the test case | |
| priority | No | New priority for the test case |
Implementation Reference
- src/xray-client.ts:324-331 (handler)Core handler function in XrayClient that implements the update_test_case logic. Currently throws an informative error as direct updates are not supported.
async updateTestCase(testKey: string, updates: Partial<TestCase>): Promise<void> { throw new Error( 'Direct test case update is not supported via Xray GraphQL API. ' + 'Use Jira REST API to update standard fields (summary, description, labels, priority). ' + 'Use specific Xray mutations for test definition updates: ' + 'updateUnstructuredTestDefinition, updateGherkinTestDefinition, updateTestType, etc.' ); } - src/index.ts:566-582 (handler)MCP CallToolRequest handler (switch case) that parses input arguments and calls the XrayClient.updateTestCase method.
case 'update_test_case': { const updates: Partial<TestCase> = {}; if (args.summary) updates.summary = args.summary as string; if (args.description) updates.description = args.description as string; if (args.labels) updates.labels = args.labels as string[]; if (args.priority) updates.priority = args.priority as string; await xrayClient.updateTestCase(args.testKey as string, updates); return { content: [ { type: 'text', text: `Test case ${args.testKey} updated successfully`, }, ], }; } - src/index.ts:83-109 (schema)Input schema definition for the update_test_case tool, defining parameters like testKey, summary, description, labels, and priority.
inputSchema: { type: 'object', properties: { testKey: { type: 'string', description: 'The test case key (e.g., "PROJ-123")', }, summary: { type: 'string', description: 'New summary/title for the test case', }, description: { type: 'string', description: 'New description for the test case', }, labels: { type: 'array', items: { type: 'string' }, description: 'New labels for the test case', }, priority: { type: 'string', description: 'New priority for the test case', }, }, required: ['testKey'], }, - src/index.ts:80-110 (registration)Tool registration in the tools array provided to MCP ListToolsRequest handler.
{ name: 'update_test_case', description: 'Update an existing test case', inputSchema: { type: 'object', properties: { testKey: { type: 'string', description: 'The test case key (e.g., "PROJ-123")', }, summary: { type: 'string', description: 'New summary/title for the test case', }, description: { type: 'string', description: 'New description for the test case', }, labels: { type: 'array', items: { type: 'string' }, description: 'New labels for the test case', }, priority: { type: 'string', description: 'New priority for the test case', }, }, required: ['testKey'], }, },