Skip to main content
Glama

create_test_set

Group related tests in Xray Cloud by creating a new test set with project key, summary, description, and test issue IDs.

Instructions

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

Input Schema

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

Implementation Reference

  • MCP server tool handler for 'create_test_set': constructs TestSet object from input arguments and delegates to XrayClient.createTestSet, returning JSON response.
    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),
          },
        ],
      };
    }
  • src/index.ts:387-412 (registration)
    Tool registration in the tools list: defines name, description, and input schema for 'create_test_set', used for MCP listTools.
      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'],
      },
    },
  • Core implementation of createTestSet in XrayClient: builds GraphQL mutation to create test set in Xray Cloud, handles Jira fields and testIssueIds, executes via graphqlRequest and returns TestSetResponse.
    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 || []
      };
    }
  • TypeScript interface defining the TestSet input type used by createTestSet.
    export interface TestSet {
      summary: string;
      projectKey: string;
      testIssueIds?: string[];
      description?: string;
    }
  • TypeScript interface defining the TestSetResponse return type from createTestSet.
    export interface TestSetResponse {
      issueId: string;
      key: string;
      tests?: any[];
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states it 'creates' a new test set, implying a write/mutation operation, but doesn't disclose behavioral traits such as permissions required, whether it's idempotent, rate limits, or what happens on failure. For a creation tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose. Every word earns its place with no waste, making it highly concise and well-structured for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and a creation tool with 4 parameters, the description is minimally adequate. It states what the tool does but lacks details on behavior, output, or usage context. It's complete enough to understand the basic purpose but insufficient for safe or effective use without external knowledge.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all 4 parameters. The description adds no additional meaning beyond what's in the schema (e.g., it doesn't explain parameter interactions or provide examples). Baseline score of 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Create a new test set') and resource ('in Xray Cloud'), with the purpose 'to group related tests'. It distinguishes from siblings like 'create_test_plan' or 'create_test_case' by specifying it's for test sets, but doesn't explicitly contrast with them. The purpose is specific and actionable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'create_test_plan' or 'add_tests_to_test_set'. The description implies usage for grouping tests, but lacks explicit context, prerequisites, or exclusions. It's a basic statement without operational guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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