Skip to main content
Glama

get_test_case

Retrieve detailed information for a specific test case using its unique key to access test management data and execution details.

Instructions

Get details of a specific test case by key

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
testKeyYesThe test case key (e.g., "PROJ-123")

Implementation Reference

  • Core handler function that executes GraphQL query to retrieve a specific test case by its key, including details like Jira fields, test type, steps, gherkin, and unstructured data.
    async getTestCase(testKey: string): Promise<any> { const query = ` query GetTest($jql: String!, $limit: Int!) { getTests(jql: $jql, limit: $limit) { total results { issueId projectId jira(fields: ["key", "summary", "description", "priority", "status", "labels"]) testType { name kind } steps { id action data result } gherkin unstructured } } } `; const variables = { jql: `key = '${testKey}'`, limit: 1 }; const result = await this.graphqlRequest<{ getTests: any }>(query, variables); if (result.getTests.total === 0) { throw new Error(`Test case ${testKey} not found`); } return result.getTests.results[0]; }
  • Input schema definition for the 'get_test_case' tool, specifying the required 'testKey' parameter.
    name: 'get_test_case', description: 'Get details of a specific test case by key', inputSchema: { type: 'object', properties: { testKey: { type: 'string', description: 'The test case key (e.g., "PROJ-123")', }, }, required: ['testKey'], },
  • src/index.ts:554-564 (registration)
    Tool dispatch/registration in the main MCP tool call handler switch statement, which calls the xrayClient.getTestCase method and formats the response.
    case 'get_test_case': { const result = await xrayClient.getTestCase(args.testKey as string); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }

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