get_sprint_issues
Retrieve all issues assigned to a specific sprint to view current tickets. Specify sprint ID and optional result limit.
Instructions
Get all issues in a specific sprint. Useful for viewing what tickets are currently in a sprint.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sprintId | Yes | The ID of the sprint to get issues from. Use get_sprints to find available sprint IDs. | |
| maxResults | No | Maximum number of issues to return (1-100). Defaults to 50. |
Implementation Reference
- src/tools/sprints.ts:227-248 (handler)Handler function for get_sprint_issues tool. Validates args using getSprintIssuesSchema, calls jiraClient.getSprintIssues(), then maps the response to essential fields (key, summary, status, assignee, priority) and returns them as JSON.
case 'get_sprint_issues': { const validatedArgs = await getSprintIssuesSchema.validate(args); const issues = await jiraClient.getSprintIssues(validatedArgs); // Extract only essential fields to reduce token usage const essentialIssues = issues.issues?.map((issue) => ({ key: issue.key, summary: issue.fields?.summary || 'No summary', status: issue.fields?.status?.name || 'Unknown', assignee: issue.fields?.assignee?.displayName || 'Unassigned', priority: issue.fields?.priority?.name || 'None' })) || []; return { content: [ { type: 'text', text: JSON.stringify(essentialIssues, null, 2), }, ], }; } - src/jira-client.ts:480-490 (handler)JiraClient method that makes the actual API call using the Jira Agile client's getIssuesForSprint() with sprintId and maxResults parameters, returning the issues response.
async getSprintIssues(input: GetSprintIssuesInput) { try { const response = await this.agileClient.sprint.getIssuesForSprint({ sprintId: input.sprintId, maxResults: input.maxResults, }); return response; } catch (error) { throw new Error(`Failed to get sprint issues: ${error instanceof Error ? error.message : 'Unknown error'}`); } } - src/schemas/index.ts:208-211 (schema)Yup validation schema for get_sprint_issues tool. Defines sprintId (required number) and maxResults (number 1-100, default 50).
export const getSprintIssuesSchema = yup.object({ sprintId: yup.number().required('Sprint ID is required'), maxResults: yup.number().min(1).max(100).default(50), }); - src/tools/sprints.ts:53-70 (registration)Tool registration definition for get_sprint_issues. Defines the tool name, description, and JSON Schema input format for the MCP protocol.
name: 'get_sprint_issues', description: 'Get all issues in a specific sprint. Useful for viewing what tickets are currently in a sprint.', inputSchema: { type: 'object', properties: { sprintId: { type: 'number', description: 'The ID of the sprint to get issues from. Use get_sprints to find available sprint IDs.', }, maxResults: { type: 'number', description: 'Maximum number of issues to return (1-100). Defaults to 50.', default: 50, }, }, required: ['sprintId'], }, }, - src/index.ts:99-106 (registration)Routes get_sprint_issues calls to handleSprintTool in the MCP server's CallToolRequestSchema handler.
name.startsWith('get_sprint_issues') || name.startsWith('get_agile_boards') || name.startsWith('delete_sprint') || name.startsWith('create_sprint') || name.startsWith('update_sprint') || name.startsWith('close_sprint') ) { return await handleSprintTool(name, args || {}, this.jiraClient);