Skip to main content
Glama

get_test_plan

Retrieve detailed information about a specific test plan, including all associated tests, to support test management and tracking in Xray Cloud.

Instructions

Get details of a specific test plan by key, including all tests

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
testPlanKeyYesThe test plan key (e.g., "PROJ-789")

Implementation Reference

  • src/index.ts:295-308 (registration)
    Registration of the 'get_test_plan' tool including its name, description, and input schema requiring 'testPlanKey'.
    {
      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'],
      },
    },
  • MCP server handler for 'get_test_plan' tool: extracts testPlanKey, calls xrayClient.getTestPlan, and returns JSON-formatted result.
    case 'get_test_plan': {
      const result = await xrayClient.getTestPlan(args.testPlanKey as string);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Core implementation of getTestPlan: executes GraphQL query to fetch test plan details by key using JQL, handles not found error, returns the result.
    async getTestPlan(testPlanKey: string): Promise<any> {
      const query = `
        query GetTestPlan($jql: String!, $limit: Int!) {
          getTestPlans(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 = '${testPlanKey}'`,
        limit: 1
      };
    
      const result = await this.graphqlRequest<{ getTestPlans: any }>(query, variables);
    
      if (result.getTestPlans.total === 0) {
        throw new Error(`Test plan ${testPlanKey} not found`);
      }
    
      return result.getTestPlans.results[0];
    }
  • TypeScript interface defining the TestPlan structure used in the tool.
    export interface TestPlan {
      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 implies a read-only operation ('Get details'), but doesn't specify whether it requires authentication, has rate limits, returns paginated results, or what format the details include (e.g., JSON structure). 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 ('Get details of a specific test plan by key, including all tests'), making it easy to parse and understand quickly. Every part of the sentence earns its place by specifying the action and scope.

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 complexity of retrieving test plan details with no annotations and no output schema, the description is incomplete. It doesn't explain what 'details' include, how 'all tests' are represented, or potential error conditions. For a tool in a context with many sibling tools and no structured output, more completeness is needed to guide effective use.

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 adds minimal value beyond the input schema, which has 100% coverage for the single parameter 'testPlanKey.' It mentions 'by key' but doesn't elaborate on key format or validation beyond what the schema provides ('e.g., "PROJ-789"'). With high schema coverage, the baseline is 3, as the description doesn't compensate with additional semantic context.

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 plan by key, including all tests.' It specifies the verb ('Get details'), resource ('test plan'), and scope ('including all tests'), which is more specific than just restating the name. However, it doesn't explicitly distinguish this tool from sibling tools like 'get_test_case' or 'get_project_test_plans,' which prevents a score of 5.

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_plans' (for listing multiple test plans) or 'search_test_plans' (for filtered searches), nor does it specify prerequisites or exclusions. This lack of contextual guidance 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