Skip to main content
Glama

update_test_case

Modify existing test cases by updating their summary, description, labels, or priority to maintain accurate and current testing documentation.

Instructions

Update an existing test case

Input Schema

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

Implementation Reference

  • The core handler function for updating a test case in XrayClient class. Currently throws an error explaining that direct updates are not supported via GraphQL and suggesting alternatives.
    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.' ); }
  • The MCP server tool execution handler (switch case) for 'update_test_case'. Prepares Partial<TestCase> from arguments and delegates to xrayClient.updateTestCase.
    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:80-110 (registration)
    Registration of the 'update_test_case' tool in the tools array, including name, description, and input schema definition.
    { 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'], }, },
  • TypeScript interface TestCase used for typing the updates in updateTestCase function.
    export interface TestCase { id?: string; key?: string; summary: string; description?: string; testType?: 'Manual' | 'Cucumber' | 'Generic'; projectKey: string; labels?: string[]; components?: string[]; priority?: string; status?: string; }

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