Skip to main content
Glama

get_project_test_cases

Retrieve all test cases for a specific Jira project to support test management and quality assurance processes.

Instructions

Get all test cases for a specific project

Input Schema

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

Implementation Reference

  • MCP tool handler for 'get_project_test_cases': extracts projectKey and optional maxResults from arguments, calls xrayClient.getTestCasesByProject, and returns the result as JSON text content.
    case 'get_project_test_cases': { const result = await xrayClient.getTestCasesByProject( args.projectKey as string, args.maxResults as number | undefined ); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
  • Input schema and tool definition for 'get_project_test_cases' registered in the tools list.
    { 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'], }, },
  • Core implementation logic in XrayClient: constructs JQL query for the project and delegates to searchTestCases.
    async getTestCasesByProject(projectKey: string, maxResults: number = 50): Promise<any> { const jql = `project = '${projectKey}'`; return this.searchTestCases(jql, maxResults); }
  • Supporting method searchTestCases that executes GraphQL query to fetch test cases matching the JQL query.
    async searchTestCases(jql: string, maxResults: number = 50): Promise<any> { const query = ` query SearchTests($jql: String!, $limit: Int!) { getTests(jql: $jql, limit: $limit) { total start limit results { issueId projectId jira(fields: ["key", "summary", "description", "priority", "status", "labels"]) testType { name kind } } } } `; const variables = { jql, limit: maxResults }; const result = await this.graphqlRequest<{ getTests: any }>(query, variables); return result.getTests; }

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