Skip to main content
Glama

add_tests_to_test_set

Add test cases to an existing test set in Xray test management by providing test issue IDs and test set ID for organized test execution and tracking.

Instructions

Add tests to an existing test set

Input Schema

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

Implementation Reference

  • Core handler function that executes the GraphQL mutation to add tests to a test set.
    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; }
  • MCP tool dispatcher case that handles the tool call by delegating to xrayClient and formatting the response.
    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), }, ], }; }
  • src/index.ts:466-483 (registration)
    Registers the tool in the tools array with name, description, and input schema for ListTools request.
    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'], }, },
  • Defines the input schema for the tool parameters.
    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'], },

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