Skip to main content
Glama

get_project_test_executions

Retrieve test executions for a Jira project to track testing progress and results. Use this tool to monitor test outcomes and manage quality assurance workflows.

Instructions

Get all test executions for a specific project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectKeyYesThe Jira project key (e.g., "PROJ")
maxResultsNoMaximum number of results to return

Implementation Reference

  • MCP server tool handler for get_project_test_executions that delegates to xrayClient.getTestExecutionsByProject and returns JSON result
    case 'get_project_test_executions': {
      const result = await xrayClient.getTestExecutionsByProject(
        args.projectKey as string,
        args.maxResults as number | undefined
      );
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Input schema definition for the get_project_test_executions tool
    {
      name: 'get_project_test_executions',
      description: 'Get all test executions for a specific project',
      inputSchema: {
        type: 'object',
        properties: {
          projectKey: {
            type: 'string',
            description: 'The Jira project key (e.g., "PROJ")',
          },
          maxResults: {
            type: 'number',
            description: 'Maximum number of results to return',
            default: 50,
          },
        },
        required: ['projectKey'],
      },
    },
  • src/index.ts:28-503 (registration)
    Tool registration in the tools array used by ListToolsRequestSchema handler
    const tools: Tool[] = [
      {
        name: 'create_test_case',
        description: 'Create a new test case in Xray Cloud',
        inputSchema: {
          type: 'object',
          properties: {
            projectKey: {
              type: 'string',
              description: 'The Jira project key (e.g., "PROJ")',
            },
            summary: {
              type: 'string',
              description: 'The test case summary/title',
            },
            description: {
              type: 'string',
              description: 'The test case description',
            },
            testType: {
              type: 'string',
              enum: ['Manual', 'Cucumber', 'Generic'],
              description: 'The type of test case',
              default: 'Manual',
            },
            labels: {
              type: 'array',
              items: { type: 'string' },
              description: 'Labels to attach to the test case',
            },
            priority: {
              type: 'string',
              description: 'Priority of the test case (e.g., "High", "Medium", "Low")',
            },
          },
          required: ['projectKey', 'summary'],
        },
      },
      {
        name: 'get_test_case',
        description: 'Get details of a specific test case by key',
        inputSchema: {
          type: 'object',
          properties: {
            testKey: {
              type: 'string',
              description: 'The test case key (e.g., "PROJ-123")',
            },
          },
          required: ['testKey'],
        },
      },
      {
        name: 'update_test_case',
        description: 'Update an existing test case',
        inputSchema: {
          type: 'object',
          properties: {
            testKey: {
              type: 'string',
              description: 'The test case key (e.g., "PROJ-123")',
            },
            summary: {
              type: 'string',
              description: 'New summary/title for the test case',
            },
            description: {
              type: 'string',
              description: 'New description for the test case',
            },
            labels: {
              type: 'array',
              items: { type: 'string' },
              description: 'New labels for the test case',
            },
            priority: {
              type: 'string',
              description: 'New priority for the test case',
            },
          },
          required: ['testKey'],
        },
      },
      {
        name: 'delete_test_case',
        description: 'Delete a test case',
        inputSchema: {
          type: 'object',
          properties: {
            testKey: {
              type: 'string',
              description: 'The test case key to delete (e.g., "PROJ-123")',
            },
          },
          required: ['testKey'],
        },
      },
      {
        name: 'search_test_cases',
        description: 'Search for test cases using JQL (Jira Query Language)',
        inputSchema: {
          type: 'object',
          properties: {
            jql: {
              type: 'string',
              description: 'JQL query to search test cases (e.g., "project = PROJ AND labels = automation")',
            },
            maxResults: {
              type: 'number',
              description: 'Maximum number of results to return',
              default: 50,
            },
          },
          required: ['jql'],
        },
      },
      {
        name: 'get_project_test_cases',
        description: 'Get all test cases for a specific project',
        inputSchema: {
          type: 'object',
          properties: {
            projectKey: {
              type: 'string',
              description: 'The Jira project key (e.g., "PROJ")',
            },
            maxResults: {
              type: 'number',
              description: 'Maximum number of results to return',
              default: 50,
            },
          },
          required: ['projectKey'],
        },
      },
      // Test Execution tools
      {
        name: 'create_test_execution',
        description: 'Create a new test execution in Xray Cloud to run tests',
        inputSchema: {
          type: 'object',
          properties: {
            projectKey: {
              type: 'string',
              description: 'The Jira project key (e.g., "PROJ")',
            },
            summary: {
              type: 'string',
              description: 'The test execution summary/title',
            },
            description: {
              type: 'string',
              description: 'The test execution description',
            },
            testIssueIds: {
              type: 'array',
              items: { type: 'string' },
              description: 'Array of test issue IDs to include in this execution (e.g., ["10001", "10002"])',
            },
            testEnvironments: {
              type: 'array',
              items: { type: 'string' },
              description: 'Array of test environments (e.g., ["Chrome", "iOS"])',
            },
          },
          required: ['projectKey', 'summary'],
        },
      },
      {
        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'],
        },
      },
      {
        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'],
        },
      },
      {
        name: 'get_project_test_executions',
        description: 'Get all test executions for a specific project',
        inputSchema: {
          type: 'object',
          properties: {
            projectKey: {
              type: 'string',
              description: 'The Jira project key (e.g., "PROJ")',
            },
            maxResults: {
              type: 'number',
              description: 'Maximum number of results to return',
              default: 50,
            },
          },
          required: ['projectKey'],
        },
      },
      {
        name: 'update_test_run_status',
        description: 'Update the status of a specific test run (e.g., mark as PASS or FAIL)',
        inputSchema: {
          type: 'object',
          properties: {
            testRunId: {
              type: 'string',
              description: 'The test run ID (obtained from test execution details)',
            },
            status: {
              type: 'string',
              enum: ['TODO', 'EXECUTING', 'PASS', 'FAIL', 'ABORTED', 'PASSED', 'FAILED'],
              description: 'The new status for the test run',
            },
          },
          required: ['testRunId', 'status'],
        },
      },
      // Test Plan tools
      {
        name: 'create_test_plan',
        description: 'Create a new test plan in Xray Cloud to organize tests',
        inputSchema: {
          type: 'object',
          properties: {
            projectKey: {
              type: 'string',
              description: 'The Jira project key (e.g., "PROJ")',
            },
            summary: {
              type: 'string',
              description: 'The test plan summary/title',
            },
            description: {
              type: 'string',
              description: 'The test plan description',
            },
            testIssueIds: {
              type: 'array',
              items: { type: 'string' },
              description: 'Array of test issue IDs to include in this plan',
            },
          },
          required: ['projectKey', 'summary'],
        },
      },
      {
        name: 'get_test_plan',
        description: 'Get details of a specific test plan by key, including all tests',
        inputSchema: {
          type: 'object',
          properties: {
            testPlanKey: {
              type: 'string',
              description: 'The test plan key (e.g., "PROJ-789")',
            },
          },
          required: ['testPlanKey'],
        },
      },
      {
        name: 'search_test_plans',
        description: 'Search for test plans using JQL (Jira Query Language)',
        inputSchema: {
          type: 'object',
          properties: {
            jql: {
              type: 'string',
              description: 'JQL query to search test plans',
            },
            maxResults: {
              type: 'number',
              description: 'Maximum number of results to return',
              default: 50,
            },
          },
          required: ['jql'],
        },
      },
      {
        name: 'get_project_test_plans',
        description: 'Get all test plans for a specific project',
        inputSchema: {
          type: 'object',
          properties: {
            projectKey: {
              type: 'string',
              description: 'The Jira project key (e.g., "PROJ")',
            },
            maxResults: {
              type: 'number',
              description: 'Maximum number of results to return',
              default: 50,
            },
          },
          required: ['projectKey'],
        },
      },
      {
        name: 'add_tests_to_test_plan',
        description: 'Add tests to an existing test plan',
        inputSchema: {
          type: 'object',
          properties: {
            testPlanIssueId: {
              type: 'string',
              description: 'The test plan issue ID (not key)',
            },
            testIssueIds: {
              type: 'array',
              items: { type: 'string' },
              description: 'Array of test issue IDs to add',
            },
          },
          required: ['testPlanIssueId', 'testIssueIds'],
        },
      },
      {
        name: 'remove_tests_from_test_plan',
        description: 'Remove tests from an existing test plan',
        inputSchema: {
          type: 'object',
          properties: {
            testPlanIssueId: {
              type: 'string',
              description: 'The test plan issue ID (not key)',
            },
            testIssueIds: {
              type: 'array',
              items: { type: 'string' },
              description: 'Array of test issue IDs to remove',
            },
          },
          required: ['testPlanIssueId', 'testIssueIds'],
        },
      },
      // Test Set tools
      {
        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'],
        },
      },
      {
        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'],
        },
      },
      {
        name: 'search_test_sets',
        description: 'Search for test sets using JQL (Jira Query Language)',
        inputSchema: {
          type: 'object',
          properties: {
            jql: {
              type: 'string',
              description: 'JQL query to search test sets',
            },
            maxResults: {
              type: 'number',
              description: 'Maximum number of results to return',
              default: 50,
            },
          },
          required: ['jql'],
        },
      },
      {
        name: 'get_project_test_sets',
        description: 'Get all test sets for a specific project',
        inputSchema: {
          type: 'object',
          properties: {
            projectKey: {
              type: 'string',
              description: 'The Jira project key (e.g., "PROJ")',
            },
            maxResults: {
              type: 'number',
              description: 'Maximum number of results to return',
              default: 50,
            },
          },
          required: ['projectKey'],
        },
      },
      {
        name: 'add_tests_to_test_set',
        description: 'Add tests to an existing test set',
        inputSchema: {
          type: 'object',
          properties: {
            testSetIssueId: {
              type: 'string',
              description: 'The test set issue ID (not key)',
            },
            testIssueIds: {
              type: 'array',
              items: { type: 'string' },
              description: 'Array of test issue IDs to add',
            },
          },
          required: ['testSetIssueId', 'testIssueIds'],
        },
      },
      {
        name: 'remove_tests_from_test_set',
        description: 'Remove tests from an existing test set',
        inputSchema: {
          type: 'object',
          properties: {
            testSetIssueId: {
              type: 'string',
              description: 'The test set issue ID (not key)',
            },
            testIssueIds: {
              type: 'array',
              items: { type: 'string' },
              description: 'Array of test issue IDs to remove',
            },
          },
          required: ['testSetIssueId', 'testIssueIds'],
        },
      },
    ];
  • XrayClient method getTestExecutionsByProject constructs JQL for project and delegates to searchTestExecutions
    async getTestExecutionsByProject(projectKey: string, maxResults: number = 50): Promise<any> {
      const jql = `project = '${projectKey}'`;
      return this.searchTestExecutions(jql, maxResults);
    }
  • Core implementation using GraphQL query to fetch test executions matching JQL, including test runs details
    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 provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves data ('Get'), implying a read-only operation, but doesn't specify whether it requires authentication, has rate limits, returns paginated results, or what format the output takes. This leaves significant behavioral aspects unclear.

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 purpose without unnecessary words. It is appropriately sized and front-loaded, making it easy to parse 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 incomplete for a tool that likely returns a list of test executions. It doesn't explain the return format, pagination behavior, error conditions, or how it differs from similar tools, leaving gaps in contextual understanding.

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 schema description coverage is 100%, with clear documentation for both parameters in the input schema. The description adds no additional parameter semantics beyond what the schema already provides, such as clarifying the scope of 'projectKey' or usage of 'maxResults'. This meets the baseline for high schema coverage.

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 ('Get') and resource ('test executions for a specific project'), making the purpose immediately understandable. However, it doesn't distinguish this tool from sibling tools like 'search_test_executions' or 'get_test_execution', which limits its differentiation.

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 like 'search_test_executions' or 'get_test_execution'. It lacks context about use cases, prerequisites, or exclusions, leaving 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