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;
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It indicates a read operation ('Get details'), which implies it is non-destructive, but does not address permissions, rate limits, error handling, or response format. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior and constraints.

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 directly states the tool's function without unnecessary words. It is front-loaded with the core action and includes essential scope information ('including all tests'), making it easy to parse and understand quickly.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is insufficient for a complete understanding. It does not explain what 'details' include, how 'all tests' are structured in the response, or any behavioral aspects like error cases. For a tool with no structured metadata, more context is needed to guide effective usage.

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?

The description mentions retrieving details 'by key,' which aligns with the single parameter 'testSetKey' in the schema. Since schema description coverage is 100%, the schema already documents the parameter adequately. The description adds minimal value beyond the schema, such as clarifying that it fetches 'all tests,' but does not provide additional syntax or format details.

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 tool's purpose: 'Get details of a specific test set by key, including all tests.' It specifies the verb ('Get'), resource ('test set'), and scope ('by key, including all tests'), which is specific and actionable. However, it does not explicitly differentiate from sibling tools like 'get_project_test_sets' or 'search_test_sets,' which might offer broader retrieval options.

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?

The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites, such as needing a valid test set key, or compare it to siblings like 'get_project_test_sets' for listing multiple sets or 'search_test_sets' for filtered searches. Without such context, an agent may struggle to select the appropriate tool.

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