Skip to main content
Glama
ennuiii

Azure DevOps MCP Server with PAT Authentication

by ennuiii

work_list_team_iterations

Retrieve current iterations for a specific team within a project in Azure DevOps. Input project and team details to track iteration progress and planning. Integrates with PAT-authenticated MCP server for secure access.

Instructions

Retrieve a list of iterations for a specific team in a project.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectYesThe name or ID of the Azure DevOps project.
teamYesThe name or ID of the Azure DevOps team.
timeframeNoThe timeframe for which to retrieve iterations. Currently, only 'current' is supported.

Implementation Reference

  • The async handler function that executes the core tool logic: connects to Azure DevOps, retrieves team iterations using WorkApi.getTeamIterations, and returns formatted JSON response or error.
    async ({ project, team, timeframe }) => { try { const connection = await connectionProvider(); const workApi = await connection.getWorkApi(); const iterations = await workApi.getTeamIterations({ project, team }, timeframe); if (!iterations) { return { content: [{ type: "text", text: "No iterations found" }], isError: true }; } return { content: [{ type: "text", text: JSON.stringify(iterations, null, 2) }], }; } catch (error) { const errorMessage = error instanceof Error ? error.message : "Unknown error occurred"; return { content: [{ type: "text", text: `Error fetching team iterations: ${errorMessage}` }], isError: true, }; } } );
  • Zod input schema defining required 'project' and 'team' strings, and optional 'timeframe' enum.
    { 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."), timeframe: z.enum(["current"]).optional().describe("The timeframe for which to retrieve iterations. Currently, only 'current' is supported."), },
  • Direct registration of the MCP tool on the server using server.tool(), including name, description, schema, and handler reference.
    server.tool( WORK_TOOLS.list_team_iterations, "Retrieve a list of iterations for a specific team in a project.", { 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."), timeframe: z.enum(["current"]).optional().describe("The timeframe for which to retrieve iterations. Currently, only 'current' is supported."), }, async ({ project, team, timeframe }) => { try { const connection = await connectionProvider(); const workApi = await connection.getWorkApi(); const iterations = await workApi.getTeamIterations({ project, team }, timeframe); if (!iterations) { return { content: [{ type: "text", text: "No iterations found" }], isError: true }; } return { content: [{ type: "text", text: JSON.stringify(iterations, null, 2) }], }; } catch (error) { const errorMessage = error instanceof Error ? error.message : "Unknown error occurred"; return { content: [{ type: "text", text: `Error fetching team iterations: ${errorMessage}` }], isError: true, }; } } );
  • Constant mapping internal function names to tool names, used in registration.
    const WORK_TOOLS = { list_team_iterations: "work_list_team_iterations", create_iterations: "work_create_iterations", assign_iterations: "work_assign_iterations", };
  • src/tools.ts:16-21 (registration)
    Higher-level registration: imports and calls configureWorkTools to register all work-related tools including 'work_list_team_iterations'.
    import { configureWorkTools } from "./tools/work.js"; import { configureWorkItemTools } from "./tools/workitems.js"; function configureAllTools(server: McpServer, tokenProvider: () => Promise<AccessToken>, connectionProvider: () => Promise<WebApi>, userAgentProvider: () => string) { configureCoreTools(server, tokenProvider, connectionProvider, userAgentProvider); configureWorkTools(server, tokenProvider, connectionProvider);

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ennuiii/DevOpsMcpPAT'

If you have feedback or need assistance with the MCP directory API, please join our Discord server