Skip to main content
Glama
ennuiii

Azure DevOps MCP Server with PAT Authentication

by ennuiii

work_assign_iterations

Assign existing iterations to a specific team in an Azure DevOps project, using the project name/ID, team name/ID, and iteration details to streamline iteration management.

Instructions

Assign existing iterations to a specific team in a project.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
iterationsYesAn array of iterations to assign. Each iteration must have an identifier and a path.
projectYesThe name or ID of the Azure DevOps project.
teamYesThe name or ID of the Azure DevOps team.

Implementation Reference

  • The handler function that executes the tool logic: assigns iterations to a team using Azure DevOps Work API's postTeamIteration method.
    async ({ project, team, iterations }) => {
      try {
        const connection = await connectionProvider();
        const workApi = await connection.getWorkApi();
        const teamContext = { project, team };
        const results = [];
    
        for (const { identifier, path } of iterations) {
          const assignment = await workApi.postTeamIteration({ path: path, id: identifier }, teamContext);
    
          if (assignment) {
            results.push(assignment);
          }
        }
    
        if (results.length === 0) {
          return { content: [{ type: "text", text: "No iterations were assigned to the team" }], isError: true };
        }
    
        return {
          content: [{ type: "text", text: JSON.stringify(results, null, 2) }],
        };
      } catch (error) {
        const errorMessage = error instanceof Error ? error.message : "Unknown error occurred";
    
        return {
          content: [{ type: "text", text: `Error assigning iterations: ${errorMessage}` }],
          isError: true,
        };
      }
    }
  • Input schema using Zod validators for project name/ID, team name/ID, and array of iterations (each with identifier and path).
    {
      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."),
      iterations: z
        .array(
          z.object({
            identifier: z.string().describe("The identifier of the iteration to assign."),
            path: z.string().describe("The path of the iteration to assign, e.g., 'Project/Iteration'."),
          })
        )
        .describe("An array of iterations to assign. Each iteration must have an identifier and a path."),
    },
  • Tool registration call to server.tool() with name WORK_TOOLS.assign_iterations ("work_assign_iterations"), description, schema, and handler.
    server.tool(
      WORK_TOOLS.assign_iterations,
      "Assign existing iterations to 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."),
        iterations: z
          .array(
            z.object({
              identifier: z.string().describe("The identifier of the iteration to assign."),
              path: z.string().describe("The path of the iteration to assign, e.g., 'Project/Iteration'."),
            })
          )
          .describe("An array of iterations to assign. Each iteration must have an identifier and a path."),
      },
      async ({ project, team, iterations }) => {
        try {
          const connection = await connectionProvider();
          const workApi = await connection.getWorkApi();
          const teamContext = { project, team };
          const results = [];
    
          for (const { identifier, path } of iterations) {
            const assignment = await workApi.postTeamIteration({ path: path, id: identifier }, teamContext);
    
            if (assignment) {
              results.push(assignment);
            }
          }
    
          if (results.length === 0) {
            return { content: [{ type: "text", text: "No iterations were assigned to the team" }], isError: true };
          }
    
          return {
            content: [{ type: "text", text: JSON.stringify(results, null, 2) }],
          };
        } catch (error) {
          const errorMessage = error instanceof Error ? error.message : "Unknown error occurred";
    
          return {
            content: [{ type: "text", text: `Error assigning iterations: ${errorMessage}` }],
            isError: true,
          };
        }
      }
    );
  • Constant mapping internal function names to tool names, including assign_iterations: "work_assign_iterations".
    const WORK_TOOLS = {
      list_team_iterations: "work_list_team_iterations",
      create_iterations: "work_create_iterations",
      assign_iterations: "work_assign_iterations",
    };
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states 'assign' implying a mutation operation, but doesn't disclose behavioral traits such as required permissions, whether assignments are reversible, error handling for invalid inputs, or impact on existing team iterations. This is a significant gap for a mutation tool with zero annotation coverage.

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 with zero waste. It's front-loaded with the core action and resource, making it easy to parse. Every word earns its place without redundancy or fluff.

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 tool's complexity (mutation with 3 parameters, no annotations, no output schema), the description is incomplete. It doesn't cover behavioral aspects like side effects, error conditions, or return values, which are crucial for safe invocation. The 100% schema coverage helps with inputs, but overall context for a mutation tool is lacking.

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?

Schema description coverage is 100%, so the schema already documents all parameters (project, team, iterations). The description adds no additional meaning beyond what's in the schema—it doesn't explain parameter relationships, constraints, or examples. Baseline 3 is appropriate when schema does the heavy lifting, but no extra value is added.

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 action ('assign') and resource ('existing iterations'), specifying the target ('to a specific team in a project'). It distinguishes from sibling tools like 'work_create_iterations' (create vs assign) and 'work_list_team_iterations' (list vs assign), though not explicitly named. However, it doesn't fully differentiate from potential overlapping tools like 'wit_update_work_item' which might also handle iterations indirectly.

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?

No guidance on when to use this tool versus alternatives is provided. The description mentions 'existing iterations' but doesn't clarify prerequisites (e.g., iterations must exist, team must be in the project) or when to choose this over other iteration-related tools like 'work_create_iterations'. It lacks explicit context about use cases or exclusions.

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