wit_get_work_items_for_iteration
Retrieve work items for a specific iteration in Azure DevOps using project and iteration IDs. Facilitates tracking and management of tasks within defined development cycles.
Instructions
Retrieve a list of work items for a specified iteration.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| iterationId | Yes | The ID of the iteration to retrieve work items for. | |
| project | Yes | The name or ID of the Azure DevOps project. | |
| team | No | The name or ID of the Azure DevOps team. If not provided, the default team will be used. |
Implementation Reference
- src/tools/workitems.ts:475-485 (handler)The handler function that executes the tool logic: connects to Azure DevOps, gets the WorkApi, and retrieves work items for the specified iteration using getIterationWorkItems.const connection = await connectionProvider(); const workApi = await connection.getWorkApi(); //get the work items for the current iteration const workItems = await workApi.getIterationWorkItems({ project, team }, iterationId); return { content: [{ type: "text", text: JSON.stringify(workItems, null, 2) }], }; } );
- src/tools/workitems.ts:470-474 (schema)Zod input schema defining parameters: project (string), team (optional string), iterationId (string).project: z.string().describe("The name or ID of the Azure DevOps project."), team: z.string().optional().describe("The name or ID of the Azure DevOps team. If not provided, the default team will be used."), iterationId: z.string().describe("The ID of the iteration to retrieve work items for."), }, async ({ project, team, iterationId }) => {
- src/tools/workitems.ts:467-486 (registration)Registers the tool 'wit_get_work_items_for_iteration' with McpServer.tool, including description, input schema, and handler.WORKITEM_TOOLS.get_work_items_for_iteration, "Retrieve a list of work items for a specified iteration.", { project: z.string().describe("The name or ID of the Azure DevOps project."), team: z.string().optional().describe("The name or ID of the Azure DevOps team. If not provided, the default team will be used."), iterationId: z.string().describe("The ID of the iteration to retrieve work items for."), }, async ({ project, team, iterationId }) => { const connection = await connectionProvider(); const workApi = await connection.getWorkApi(); //get the work items for the current iteration const workItems = await workApi.getIterationWorkItems({ project, team }, iterationId); return { content: [{ type: "text", text: JSON.stringify(workItems, null, 2) }], }; } );
- src/tools/workitems.ts:21-21 (helper)Constant mapping the internal tool key to the MCP tool name 'wit_get_work_items_for_iteration'.get_work_items_for_iteration: "wit_get_work_items_for_iteration",