Skip to main content
Glama

search_test_executions

Search for test executions in Xray using JQL queries to filter results by project, date, or other criteria. Retrieve specific test execution data for analysis and reporting.

Instructions

Search for test executions using JQL (Jira Query Language)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jqlYesJQL query to search test executions (e.g., "project = PROJ AND created >= -7d")
maxResultsNoMaximum number of results to return

Implementation Reference

  • MCP server tool handler for 'search_test_executions'. Extracts arguments, calls xrayClient.searchTestExecutions, and formats result as MCP content response.
    case 'search_test_executions': {
      const result = await xrayClient.searchTestExecutions(
        args.jql as string,
        args.maxResults as number | undefined
      );
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • src/index.ts:211-228 (registration)
    Tool registration object defining the 'search_test_executions' tool, including name, description, and input schema. Used by the MCP server for tool listing.
      name: 'search_test_executions',
      description: 'Search for test executions using JQL (Jira Query Language)',
      inputSchema: {
        type: 'object',
        properties: {
          jql: {
            type: 'string',
            description: 'JQL query to search test executions (e.g., "project = PROJ AND created >= -7d")',
          },
          maxResults: {
            type: 'number',
            description: 'Maximum number of results to return',
            default: 50,
          },
        },
        required: ['jql'],
      },
    },
  • Core implementation of test execution search via GraphQL query in XrayClient class. Executes 'getTestExecutions' query with JQL and limit, returning detailed results including test runs.
    async searchTestExecutions(jql: string, maxResults: number = 50): Promise<any> {
      const query = `
        query SearchTestExecutions($jql: String!, $limit: Int!) {
          getTestExecutions(jql: $jql, limit: $limit) {
            total
            start
            limit
            results {
              issueId
              projectId
              jira(fields: ["key", "summary", "description", "status", "created", "updated"])
              testRuns(limit: 100) {
                total
                results {
                  id
                  status {
                    name
                    description
                  }
                  test {
                    issueId
                    jira(fields: ["key", "summary"])
                  }
                }
              }
            }
          }
        }
      `;
    
      const variables = {
        jql,
        limit: maxResults
      };
    
      const result = await this.graphqlRequest<{ getTestExecutions: any }>(query, variables);
      return result.getTestExecutions;
    }
Behavior2/5

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

With no annotations, the description carries full burden but lacks behavioral details. It doesn't disclose whether this is read-only, its rate limits, authentication needs, or what happens on execution (e.g., pagination, error handling). The mention of JQL adds some context but is insufficient for a mutation-aware tool.

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 with zero waste. It front-loads the core action and method, making it easy to parse quickly without unnecessary elaboration.

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 no annotations, no output schema, and a search tool with potential complexity (JQL queries), the description is incomplete. It doesn't explain return values, error cases, or behavioral traits, leaving gaps for an AI agent to infer usage safely.

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 already documents both parameters thoroughly. The description adds no additional meaning beyond implying JQL usage, which is covered in the schema's example. Baseline 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 verb ('Search for') and resource ('test executions'), specifying the method ('using JQL'). It distinguishes from siblings like 'get_project_test_executions' by emphasizing search functionality, though it doesn't explicitly contrast with 'search_test_cases' or 'search_test_plans'.

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 'get_project_test_executions' or other search siblings. The description implies usage for JQL-based queries but offers no context on prerequisites, exclusions, or comparative scenarios.

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