Skip to main content
Glama

search_test_plans

Search for test plans in Xray using JQL queries to find specific testing documentation and organize test management workflows.

Instructions

Search for test plans using JQL (Jira Query Language)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jqlYesJQL query to search test plans
maxResultsNoMaximum number of results to return

Implementation Reference

  • MCP server handler for the 'search_test_plans' tool. Extracts JQL and maxResults from arguments, calls xrayClient.searchTestPlans, and returns the result as JSON text content.
    case 'search_test_plans': {
      const result = await xrayClient.searchTestPlans(
        args.jql as string,
        args.maxResults as number | undefined
      );
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Input schema definition for the 'search_test_plans' tool, specifying JQL query (required) and optional maxResults.
    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'],
    },
  • src/index.ts:309-327 (registration)
    Registration of the 'search_test_plans' tool in the MCP tools list, including name, description, and input schema.
    {
      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'],
      },
    },
  • Core implementation of searchTestPlans in XrayClient: executes GraphQL query to getTestPlans with JQL and limit, returns paginated results including test plans and summary tests.
    async searchTestPlans(jql: string, maxResults: number = 50): Promise<any> {
      const query = `
        query SearchTestPlans($jql: String!, $limit: Int!) {
          getTestPlans(jql: $jql, limit: $limit) {
            total
            start
            limit
            results {
              issueId
              projectId
              jira(fields: ["key", "summary", "description", "status", "created", "updated"])
              tests(limit: 10) {
                total
                results {
                  issueId
                  jira(fields: ["key", "summary"])
                }
              }
            }
          }
        }
      `;
    
      const variables = {
        jql,
        limit: maxResults
      };
    
      const result = await this.graphqlRequest<{ getTestPlans: any }>(query, variables);
      return result.getTestPlans;
    }
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 search uses JQL but doesn't describe what the tool returns (e.g., list of test plans, pagination behavior, error handling), whether it's read-only or has side effects, or any limitations like rate limits or authentication needs. This is a significant gap for a tool with potential complexity in JQL queries.

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's front-loaded with the core action and resource, making it easy to parse. Every word earns its place by specifying the search method (JQL).

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 JQL-based search, no annotations, and no output schema, the description is incomplete. It doesn't explain return values, error cases, or behavioral traits like pagination. For a tool that could involve complex queries and varied results, more context 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?

Schema description coverage is 100%, so the schema fully documents both parameters ('jql' and 'maxResults'). The description adds no additional meaning beyond what's in the schema, such as JQL syntax examples or constraints on 'maxResults'. The baseline score of 3 is appropriate when 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') and resource ('test plans'), and specifies the query language ('using JQL'). It distinguishes itself from siblings like 'get_project_test_plans' by emphasizing search functionality. However, it doesn't explicitly differentiate from other search tools like 'search_test_cases' or 'search_test_sets' beyond the resource name.

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 when to prefer this over 'get_project_test_plans' (which likely retrieves all test plans in a project) or other search tools like 'search_test_cases'. There are no exclusions, prerequisites, or context for usage beyond the basic action.

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