Skip to main content
Glama

create_test_set

Create a new test set in Xray Cloud to group related tests for organized test management and execution tracking.

Instructions

Create a new test set in Xray Cloud to group related tests

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionNoThe test set description
projectKeyYesThe Jira project key (e.g., "PROJ")
summaryYesThe test set summary/title
testIssueIdsNoArray of test issue IDs to include in this set

Implementation Reference

  • src/index.ts:386-412 (registration)
    Tool registration entry in the tools array defining name, description, and input schema for create_test_set
    { name: 'create_test_set', description: 'Create a new test set in Xray Cloud to group related tests', inputSchema: { type: 'object', properties: { projectKey: { type: 'string', description: 'The Jira project key (e.g., "PROJ")', }, summary: { type: 'string', description: 'The test set summary/title', }, description: { type: 'string', description: 'The test set description', }, testIssueIds: { type: 'array', items: { type: 'string' }, description: 'Array of test issue IDs to include in this set', }, }, required: ['projectKey', 'summary'], }, },
  • Input schema defining parameters for create_test_set tool: projectKey, summary, optional description and testIssueIds
    inputSchema: { type: 'object', properties: { projectKey: { type: 'string', description: 'The Jira project key (e.g., "PROJ")', }, summary: { type: 'string', description: 'The test set summary/title', }, description: { type: 'string', description: 'The test set description', }, testIssueIds: { type: 'array', items: { type: 'string' }, description: 'Array of test issue IDs to include in this set', }, }, required: ['projectKey', 'summary'], },
  • MCP server handler for create_test_set tool: constructs TestSet from input arguments and delegates execution to xrayClient.createTestSet, returns JSON result
    case 'create_test_set': { const testSet: TestSet = { projectKey: args.projectKey as string, summary: args.summary as string, description: args.description as string | undefined, testIssueIds: args.testIssueIds as string[] | undefined, }; const result = await xrayClient.createTestSet(testSet); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
  • Core handler in XrayClient class: executes GraphQL mutation to create a new test set in Xray Cloud, optionally adding test issues, and returns the created test set details
    async createTestSet(testSet: TestSet): Promise<TestSetResponse> { const mutation = ` mutation CreateTestSet($jira: JSON!, $testIssueIds: [String]) { createTestSet(jira: $jira, testIssueIds: $testIssueIds) { testSet { issueId jira(fields: ["key", "summary"]) tests(limit: 100) { results { issueId jira(fields: ["key", "summary"]) } } } warnings } } `; const jiraFields: any = { fields: { project: { key: testSet.projectKey }, summary: testSet.summary, issuetype: { name: 'Test Set' } } }; if (testSet.description) { jiraFields.fields.description = testSet.description; } const variables: any = { jira: jiraFields }; if (testSet.testIssueIds && testSet.testIssueIds.length > 0) { variables.testIssueIds = testSet.testIssueIds; } const result = await this.graphqlRequest<{ createTestSet: any }>(mutation, variables); return { issueId: result.createTestSet.testSet.issueId, key: result.createTestSet.testSet.jira.key, tests: result.createTestSet.testSet.tests?.results || [] }; }

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