Skip to main content
Glama

get_test_execution

Retrieve detailed test execution results by key to analyze test runs and track testing progress within Xray Cloud.

Instructions

Get details of a specific test execution by key, including all test runs

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
testExecutionKeyYesThe test execution key (e.g., "PROJ-456")

Implementation Reference

  • MCP tool handler case for 'get_test_execution': extracts testExecutionKey from args, calls xrayClient.getTestExecution, and returns JSON-formatted result as text content.
    case 'get_test_execution': {
      const result = await xrayClient.getTestExecution(args.testExecutionKey as string);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Input schema defining the required 'testExecutionKey' string parameter for the get_test_execution tool.
    inputSchema: {
      type: 'object',
      properties: {
        testExecutionKey: {
          type: 'string',
          description: 'The test execution key (e.g., "PROJ-456")',
        },
      },
      required: ['testExecutionKey'],
    },
  • src/index.ts:196-209 (registration)
    Tool registration object in the 'tools' array, including name, description, and inputSchema, used by ListToolsRequestHandler.
    {
      name: 'get_test_execution',
      description: 'Get details of a specific test execution by key, including all test runs',
      inputSchema: {
        type: 'object',
        properties: {
          testExecutionKey: {
            type: 'string',
            description: 'The test execution key (e.g., "PROJ-456")',
          },
        },
        required: ['testExecutionKey'],
      },
    },
  • XrayClient method implementing the core logic: GraphQL query to fetch specific test execution by key, including test runs details, with error if not found.
    async getTestExecution(testExecutionKey: string): Promise<any> {
      const query = `
        query GetTestExecution($jql: String!, $limit: Int!) {
          getTestExecutions(jql: $jql, limit: $limit) {
            total
            results {
              issueId
              projectId
              jira(fields: ["key", "summary", "description", "status"])
              testRuns(limit: 100) {
                results {
                  id
                  status {
                    name
                    description
                  }
                  test {
                    issueId
                    jira(fields: ["key", "summary"])
                  }
                  startedOn
                  finishedOn
                  executedBy
                }
              }
            }
          }
        }
      `;
    
      const variables = {
        jql: `key = '${testExecutionKey}'`,
        limit: 1
      };
    
      const result = await this.graphqlRequest<{ getTestExecutions: any }>(query, variables);
    
      if (result.getTestExecutions.total === 0) {
        throw new Error(`Test execution ${testExecutionKey} not found`);
      }
    
      return result.getTestExecutions.results[0];
    }
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. While it indicates this is a read operation ('Get details'), it doesn't cover critical aspects like authentication needs, rate limits, error handling, or what 'details' specifically include (e.g., format, depth). For a tool with no 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 without unnecessary words. It directly states what the tool does and includes a key detail ('including all test runs'), making it appropriately sized and well-structured for quick comprehension.

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 the tool's low complexity (1 parameter, no nested objects) and high schema coverage (100%), the description is minimally adequate. However, with no annotations and no output schema, it fails to fully compensate for missing behavioral and output details. A more complete description would clarify the return format or usage context, but it meets basic requirements for a simple lookup tool.

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 'by key', which aligns with the single parameter 'testExecutionKey' in the schema. Since schema description coverage is 100% (the parameter is fully documented in the schema), the description adds minimal value beyond what's already structured. The baseline score of 3 reflects adequate but not enhanced parameter semantics.

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 execution by key, including all test runs'. It specifies the verb ('Get'), resource ('test execution'), and scope ('by key, including all test runs'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'get_project_test_executions' or 'search_test_executions', which prevents a perfect score.

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 doesn't mention sibling tools like 'get_project_test_executions' (for listing multiple executions) or 'search_test_executions' (for filtered searches), nor does it specify prerequisites or exclusions. This lack of context leaves the agent to infer usage from the tool name alone.

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