get_project_test_sets
Retrieve all test sets for a specific Jira project to organize and manage testing activities within your test management workflow.
Instructions
Get all test sets for a specific project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| maxResults | No | Maximum number of results to return | |
| projectKey | Yes | The Jira project key (e.g., "PROJ") |
Implementation Reference
- src/index.ts:446-464 (registration)Tool registration in the tools array including name, description, and input schema.{ name: 'get_project_test_sets', description: 'Get all test sets 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:841-854 (handler)MCP tool handler in the switch statement that calls the XrayClient method and returns JSON response.case 'get_project_test_sets': { const result = await xrayClient.getTestSetsByProject( args.projectKey as string, args.maxResults as number | undefined ); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
- src/xray-client.ts:907-910 (handler)Core handler method in XrayClient that constructs JQL and delegates to searchTestSets.async getTestSetsByProject(projectKey: string, maxResults: number = 50): Promise<any> { const jql = `project = '${projectKey}'`; return this.searchTestSets(jql, maxResults); }
- src/xray-client.ts:872-902 (helper)Helper method that executes GraphQL query to search test sets using JQL.async searchTestSets(jql: string, maxResults: number = 50): Promise<any> { const query = ` query SearchTestSets($jql: String!, $limit: Int!) { getTestSets(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<{ getTestSets: any }>(query, variables); return result.getTestSets; }