Skip to main content
Glama

get_test_plan

Retrieve detailed information about a specific test plan including all associated tests using the test plan key identifier.

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

  • MCP server tool handler for 'get_test_plan': extracts testPlanKey from args, calls xrayClient.getTestPlan(), serializes result to JSON text content.
    case 'get_test_plan': { const result = await xrayClient.getTestPlan(args.testPlanKey as string); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
  • Tool definition with input schema: requires 'testPlanKey' string for fetching specific test plan.
    { 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'], }, },
  • src/index.ts:519-521 (registration)
    Registration of tool list handler that returns the tools array containing 'get_test_plan'.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });
  • XrayClient helper method implementing the core logic: GraphQL query to fetch test plan by key using getTestPlans, returns detailed plan with tests if found.
    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]; }

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