list_projects
Retrieve all accessible Jira projects to view available work items and project metadata for issue management and tracking.
Instructions
List all accessible Jira projects
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| maxResults | No | Maximum number of projects to return (default: 50) |
Implementation Reference
- src/handlers/project-handlers.ts:7-36 (handler)The handler function that executes the list_projects tool by fetching projects from Jira API and formatting the response using JiraFormatters.async handleListProjects(args: any) { try { const { maxResults = 50 } = args || {}; const params = { maxResults, }; const projects = await this.apiClient.get('/project', params); return { content: [ { type: 'text', text: JiraFormatters.formatProjects(projects), }, ], }; } catch (error: any) { return { content: [ { type: 'text', text: JiraFormatters.formatError(error), }, ], isError: true, }; } }
- src/tools/definitions.ts:135-147 (schema)The tool definition including name, description, and input schema for the list_projects tool.{ name: 'list_projects', description: 'List all accessible Jira projects', inputSchema: { type: 'object', properties: { maxResults: { type: 'number', description: 'Maximum number of projects to return (default: 50)', }, }, }, },
- src/index.ts:110-111 (registration)The switch statement case that registers and dispatches list_projects tool calls to the projectHandlers.handleListProjects method.case 'list_projects': return this.projectHandlers.handleListProjects(request.params.arguments);