Skip to main content
Glama
ennuiii

Azure DevOps MCP Server with PAT Authentication

by ennuiii

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
NameRequiredDescriptionDefault
iterationIdYesThe ID of the iteration to retrieve work items for.
projectYesThe name or ID of the Azure DevOps project.
teamNoThe name or ID of the Azure DevOps team. If not provided, the default team will be used.

Implementation Reference

  • 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) }],
        };
      }
    );
  • 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 }) => {
  • 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) }],
        };
      }
    );
  • 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",
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It implies a read-only operation ('Retrieve'), but doesn't disclose details like authentication needs, rate limits, pagination behavior, or what happens if the iteration doesn't exist. For a tool with zero annotation coverage, this is inadequate.

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, clear sentence with zero wasted words. It's front-loaded with the core purpose and efficiently communicates the essential action without unnecessary elaboration.

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 no annotations and no output schema, the description is incomplete. It doesn't explain what the returned list contains (e.g., work item fields, format), error conditions, or behavioral traits like pagination. For a retrieval tool with 3 parameters, this leaves significant gaps for an AI agent.

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 three parameters thoroughly. The description adds no additional meaning beyond what's in the schema (e.g., it doesn't explain iteration context or project/team relationships). Baseline 3 is appropriate when the schema does the heavy lifting.

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 ('Retrieve a list') and resource ('work items for a specified iteration'), making the purpose understandable. However, it doesn't distinguish this tool from sibling tools like 'wit_list_backlog_work_items' or 'wit_my_work_items' that also retrieve work items, which prevents a perfect score.

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 sibling tools like 'wit_get_work_item' (for single items) or 'wit_get_work_items_batch_by_ids' (for multiple items by ID), nor does it specify prerequisites or contexts for iteration-based retrieval.

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