Skip to main content
Glama

add_tests_to_test_set

Add test cases to an existing test set in Xray test management to organize and group related tests for execution.

Instructions

Add tests to an existing test set

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
testSetIssueIdYesThe test set issue ID (not key)
testIssueIdsYesArray of test issue IDs to add

Implementation Reference

  • Core handler function that executes the GraphQL mutation to add tests to a test set in Xray.
    async addTestsToTestSet(testSetIssueId: string, testIssueIds: string[]): Promise<any> { const mutation = ` mutation AddTestsToTestSet($issueId: String!, $testIssueIds: [String]!) { addTestsToTestSet(issueId: $issueId, testIssueIds: $testIssueIds) { addedTests warning } } `; const variables = { issueId: testSetIssueId, testIssueIds }; const result = await this.graphqlRequest<{ addTestsToTestSet: any }>(mutation, variables); return result.addTestsToTestSet; }
  • Tool schema definition including input validation for the add_tests_to_test_set tool.
    { name: 'add_tests_to_test_set', description: 'Add tests to an existing test set', inputSchema: { type: 'object', properties: { testSetIssueId: { type: 'string', description: 'The test set issue ID (not key)', }, testIssueIds: { type: 'array', items: { type: 'string' }, description: 'Array of test issue IDs to add', }, }, required: ['testSetIssueId', 'testIssueIds'], }, },
  • src/index.ts:856-869 (registration)
    MCP server handler that registers and dispatches the tool call to the xrayClient implementation.
    case 'add_tests_to_test_set': { const result = await xrayClient.addTestsToTestSet( args.testSetIssueId as string, args.testIssueIds as string[] ); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
  • Top-level MCP tool execution handler that calls the core implementation.
    case 'add_tests_to_test_set': { const result = await xrayClient.addTestsToTestSet( args.testSetIssueId as string, args.testIssueIds 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