Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
testKeyYesThe test case key (e.g., "PROJ-123")
summaryNoNew summary/title for the test case
descriptionNoNew description for the test case
labelsNoNew labels for the test case
priorityNoNew priority for the test case

Implementation Reference

  • 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.' ); }
  • 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`, }, ], }; }
  • 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'], }, },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/c4m3lblue-star/xray-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server