Skip to main content
Glama

get_test_set

Retrieve a specific test set's details and all associated tests by providing its key, enabling test management and analysis in Xray Cloud.

Instructions

Get details of a specific test set by key, including all tests

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
testSetKeyYesThe test set key (e.g., "PROJ-890")

Implementation Reference

  • MCP server handler for the 'get_test_set' tool. Extracts testSetKey from arguments, calls xrayClient.getTestSet, and returns the JSON stringified result.
    case 'get_test_set': { const result = await xrayClient.getTestSet(args.testSetKey as string); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
  • Tool definition including name, description, and input schema requiring 'testSetKey'.
    { name: 'get_test_set', description: 'Get details of a specific test set by key, including all tests', inputSchema: { type: 'object', properties: { testSetKey: { type: 'string', description: 'The test set key (e.g., "PROJ-890")', }, }, required: ['testSetKey'], }, },
  • src/index.ts:519-523 (registration)
    Registers the list tools handler which returns the tools array containing 'get_test_set'.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; }); // Handle tool execution
  • Core implementation of getTestSet: executes GraphQL query to retrieve a specific test set by its key using JQL filter, returns detailed info including tests if found.
    async getTestSet(testSetKey: string): Promise<any> { const query = ` query GetTestSet($jql: String!, $limit: Int!) { getTestSets(jql: $jql, limit: $limit) { total results { issueId projectId jira(fields: ["key", "summary", "description", "status"]) tests(limit: 100) { total results { issueId jira(fields: ["key", "summary", "status"]) testType { name kind } } } } } } `; const variables = { jql: `key = '${testSetKey}'`, limit: 1 }; const result = await this.graphqlRequest<{ getTestSets: any }>(query, variables); if (result.getTestSets.total === 0) { throw new Error(`Test set ${testSetKey} not found`); } return result.getTestSets.results[0]; }
  • Type definition for TestSet used in tool operations.
    export interface TestSet { summary: string; projectKey: string; testIssueIds?: string[]; description?: 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