wit_list_backlog_work_items
Retrieve work items from a specific backlog category in Azure DevOps for a given project and team using PAT authentication.
Instructions
Retrieve a list of backlogs of for a given project, team, and backlog category
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| backlogId | Yes | The ID of the backlog category to retrieve work items from. | |
| project | Yes | The name or ID of the Azure DevOps project. | |
| team | Yes | The name or ID of the Azure DevOps team. |
Implementation Reference
- src/tools/workitems.ts:93-103 (handler)Handler function that calls Azure DevOps WorkApi.getBacklogLevelWorkItems to retrieve work items for the specified backlog.async ({ project, team, backlogId }) => { const connection = await connectionProvider(); const workApi = await connection.getWorkApi(); const teamContext = { project, team }; const workItems = await workApi.getBacklogLevelWorkItems(teamContext, backlogId); return { content: [{ type: "text", text: JSON.stringify(workItems, null, 2) }], }; }
- src/tools/workitems.ts:88-92 (schema)Input schema using Zod validators for project, team, and backlogId parameters.{ project: z.string().describe("The name or ID of the Azure DevOps project."), team: z.string().describe("The name or ID of the Azure DevOps team."), backlogId: z.string().describe("The ID of the backlog category to retrieve work items from."), },
- src/tools/workitems.ts:85-104 (registration)Direct registration of the tool using McpServer.tool() with name resolved from WORKITEM_TOOLS.list_backlog_work_items ("wit_list_backlog_work_items").server.tool( WORKITEM_TOOLS.list_backlog_work_items, "Retrieve a list of backlogs of for a given project, team, and backlog category", { project: z.string().describe("The name or ID of the Azure DevOps project."), team: z.string().describe("The name or ID of the Azure DevOps team."), backlogId: z.string().describe("The ID of the backlog category to retrieve work items from."), }, async ({ project, team, backlogId }) => { const connection = await connectionProvider(); const workApi = await connection.getWorkApi(); const teamContext = { project, team }; const workItems = await workApi.getBacklogLevelWorkItems(teamContext, backlogId); return { content: [{ type: "text", text: JSON.stringify(workItems, null, 2) }], }; } );
- src/tools/workitems.ts:15-15 (helper)Mapping in WORKITEM_TOOLS constant from internal name to external MCP tool name.list_backlog_work_items: "wit_list_backlog_work_items",
- src/tools.ts:24-24 (registration)Call to configureWorkItemTools which registers the wit_list_backlog_work_items tool among others.configureWorkItemTools(server, tokenProvider, connectionProvider, userAgentProvider);