list_sprints_from_board
Retrieve sprints associated with a specific Jira board to track agile development cycles and project progress.
Instructions
List sprints from a board
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| boardId | Yes | The ID of the board | |
| maxResults | No | The maximum number of results to return, (max: 100) | |
| startAt | No | The starting index of the returned boards |
Implementation Reference
- The handler function that implements the core logic of listing sprints from a specified Jira board, handling optional pagination parameters and using the $jiraJson utility to fetch data from the Jira API.export async function listSprintsFromBoard(input: ListSprintsFromBoardInput) { const url = new URL( `/rest/agile/1.0/board/${input.boardId}/sprint`, env.JIRA_BASE_URL, ); if (input.startAt) url.searchParams.set("startAt", input.startAt.toString()); if (input.maxResults) url.searchParams.set("maxResults", input.maxResults.toString()); const json = await $jiraJson(url.toString()); if (json.isErr()) return err(json.error); return ok(json.value); }
- Zod schema defining the input structure for the tool: required boardId (string) and optional maxResults, startAt (numbers).export const listSprintsFromBoardInputSchema = z.object({ boardId: z.string().describe("The ID of the board"), maxResults: z .number() .optional() .describe("The maximum number of results to return, (max: 100)"), startAt: z .number() .optional() .describe("The starting index of the returned boards"), });
- src/tools/list-sprints-from-board.ts:22-28 (registration)Exports the Tool object with name, description, and inputSchema, used for MCP tool registration.export const LIST_SPRINTS_FROM_BOARD_TOOL: Tool = { name: "list_sprints_from_board", description: "List sprints from a board", inputSchema: zodToJsonSchema( listSprintsFromBoardInputSchema, ) as Tool["inputSchema"], };
- src/app.ts:39-48 (registration)Registers the list_sprints_from_board tool (via LIST_SPRINTS_FROM_BOARD_TOOL) in the server's list of available tools.export const tools = [ // list LIST_PROJECTS_TOOL, LIST_BOARDS_TOOL, LIST_SPRINTS_FROM_BOARD_TOOL, LIST_ISSUES_FROM_SPRINT_TOOL, // create CREATE_ISSUE_TOOL, ] satisfies Tool[];