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);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves a list, implying a read-only operation, but doesn't specify authentication needs, rate limits, pagination, error conditions, or the format of returned iterations. For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core action ('Retrieve a list of iterations') without unnecessary words. It directly conveys the purpose without redundancy, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of retrieving iterations in Azure DevOps, the lack of annotations and output schema means the description should do more. It doesn't explain what an 'iteration' entails (e.g., sprint details), the structure of the returned list, or potential limitations (e.g., only 'current' timeframe supported). For a tool with no structured behavioral or output data, this is incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, clearly documenting all three parameters (project, team, timeframe with enum 'current'). The description adds no additional meaning beyond what the schema provides, such as examples or constraints on project/team formats. With high schema coverage, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Retrieve a list') and resource ('iterations for a specific team in a project'), making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'wit_get_work_items_for_iteration' or 'work_create_iterations', which also involve iterations but serve different purposes (fetching work items vs. creating iterations).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing project/team access), exclusions (e.g., not for past/future iterations beyond 'current'), or comparisons to siblings like 'wit_get_work_items_for_iteration' (which retrieves work items for iterations) or 'work_create_iterations' (which creates new iterations).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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