list_projects
Retrieve all Jira projects integrated with Zephyr Scale Cloud for test management, with pagination controls to manage result sets.
Instructions
List all Zephyr-integrated Jira projects
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| maxResults | No | Maximum number of results to return (default: 50, max: 1000) | |
| startAt | No | Starting position for pagination (default: 0) |
Implementation Reference
- src/tools/project-tools.js:14-47 (handler)The handler function that executes the list_projects tool logic, fetching projects via ZephyrClient and returning formatted JSON response or error.async function listProjects(args) { try { const params = { maxResults: args.maxResults || config.defaultMaxResults, startAt: args.startAt || 0 }; const response = await client.getProjects(params); return { content: [ { type: 'text', text: JSON.stringify({ projects: response.values || response, total: response.total || response.length, startAt: response.startAt || 0, maxResults: response.maxResults || params.maxResults }, null, 2) } ] }; } catch (error) { return { content: [ { type: 'text', text: formatError(error, 'fetching projects') } ], isError: true }; } }
- src/tools/project-tools.js:86-102 (schema)Input schema for the list_projects tool, defining optional parameters maxResults and startAt with validation.inputSchema: { type: 'object', properties: { maxResults: { type: 'number', description: 'Maximum number of results to return (default: 50, max: 1000)', minimum: 1, maximum: config.maxMaxResults, default: config.defaultMaxResults }, startAt: { type: 'number', description: 'Starting position for pagination (default: 0)', minimum: 0, default: 0 } }
- src/tools/project-tools.js:83-105 (registration)Registration of the list_projects tool as part of the projectTools array, linking name, description, schema, and handler.{ name: 'list_projects', description: 'List all Zephyr-integrated Jira projects', inputSchema: { type: 'object', properties: { maxResults: { type: 'number', description: 'Maximum number of results to return (default: 50, max: 1000)', minimum: 1, maximum: config.maxMaxResults, default: config.defaultMaxResults }, startAt: { type: 'number', description: 'Starting position for pagination (default: 0)', minimum: 0, default: 0 } } }, handler: listProjects },
- src/index.js:30-37 (registration)Global registration where projectTools (including list_projects) are combined into allTools used by the MCP server dispatcher.const allTools = [ ...projectTools, ...folderTools, ...testCaseTools, ...testStepsTools, ...testScriptTools, ...referenceDataTools ];