Skip to main content
Glama

get_project_test_plans

Retrieve all test plans for a specific Jira project to manage testing workflows and track test coverage.

Instructions

Get all test plans 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_plans'. Extracts projectKey and optional maxResults from arguments, calls xrayClient.getTestPlansByProject, and returns JSON stringified result.
    case 'get_project_test_plans': {
      const result = await xrayClient.getTestPlansByProject(
        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_plans' tool, specifying required projectKey and optional maxResults.
    {
      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'],
      },
    },
  • src/index.ts:328-346 (registration)
    Registration of the 'get_project_test_plans' tool in the tools array used by ListToolsRequestHandler.
    {
      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'],
      },
    },
  • XrayClient helper method that builds JQL query for test plans in a project and delegates to searchTestPlans.
    async getTestPlansByProject(projectKey: string, maxResults: number = 50): Promise<any> {
      const jql = `project = '${projectKey}'`;
      return this.searchTestPlans(jql, maxResults);
    }
  • Core helper method that executes GraphQL query to search test plans by JQL, fetching details including contained 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 full burden but only states the basic action without behavioral details. It doesn't mention whether this is a read-only operation, if it requires specific permissions, how results are ordered or paginated, or what the output format looks like (e.g., list of objects with fields). For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior.

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's appropriately sized for a simple retrieval tool and front-loaded with the core action, making it easy to parse quickly.

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 (simple retrieval with 2 parameters) and 100% schema coverage, the description is minimally adequate but lacks context about output format, pagination, or behavioral traits. Without annotations or an output schema, the description should ideally mention what the return value contains (e.g., list of test plan objects) to be more complete, but it's not critically incomplete for this use case.

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 (projectKey and maxResults). The description adds no additional meaning beyond implying the tool uses 'projectKey' to filter results, which is already clear from the schema. This meets the baseline of 3 when the schema does the heavy lifting, but the description doesn't enhance parameter understanding.

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 ('all test plans for a specific project'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_test_plan' (singular) or 'search_test_plans', which could cause confusion about when to use this specific list-retrieval tool versus alternatives.

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 'get_test_plan' (for a single test plan) or 'search_test_plans' (for filtered searches). It mentions 'for a specific project' but doesn't clarify if this is the only way to get test plans by project or if other tools serve similar purposes with different scopes or filters.

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