Skip to main content
Glama
Vortiago
by Vortiago

get_team_iterations

Retrieve sprint schedules and date ranges for Azure DevOps teams to view iteration calendars, identify active sprints, and plan work based on time periods.

Instructions

    Retrieves the iterations (sprints) assigned to a specific team.
    
    Use this tool when you need to:
    - View a team's sprint schedule
    - Find date ranges for iterations
    - Determine which iteration is currently active
    - Plan work based on team's iteration calendar
    
    IMPORTANT: Iterations in Azure DevOps define time periods for planning
    and tracking work. They determine sprint dates and are used for
    capacity planning, burndown charts, and velocity calculations.
    
    Args:
        project_name_or_id: The name or ID of the team project
        team_name_or_id: The name or ID of the team
        current: If True, return only the current iteration
            
    Returns:
        Formatted string containing team iteration information including
        names, date ranges, and time frames (past/current/future),
        formatted as markdown
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_name_or_idYes
team_name_or_idYes
currentNo

Implementation Reference

  • The primary MCP tool handler for the 'get_team_iterations' tool. This function is decorated with @mcp.tool() and implements the tool logic by obtaining the Azure DevOps work client and delegating to the helper implementation function.
    @mcp.tool()
    def get_team_iterations(
        project_name_or_id: str,
        team_name_or_id: str,
        current: Optional[bool] = None
    ) -> str:
        """
        Retrieves the iterations (sprints) assigned to a specific team.
        
        Use this tool when you need to:
        - View a team's sprint schedule
        - Find date ranges for iterations
        - Determine which iteration is currently active
        - Plan work based on team's iteration calendar
        
        IMPORTANT: Iterations in Azure DevOps define time periods for planning
        and tracking work. They determine sprint dates and are used for
        capacity planning, burndown charts, and velocity calculations.
        
        Args:
            project_name_or_id: The name or ID of the team project
            team_name_or_id: The name or ID of the team
            current: If True, return only the current iteration
                
        Returns:
            Formatted string containing team iteration information including
            names, date ranges, and time frames (past/current/future),
            formatted as markdown
        """
        try:
            work_client = get_work_client()
            return _get_team_iterations_impl(
                work_client,
                project_name_or_id,
                team_name_or_id,
                current
            )
        except AzureDevOpsClientError as e:
            return f"Error: {str(e)}"
  • Core helper function that performs the actual API call to retrieve team iterations using the Azure DevOps SDK, formats them, and handles errors.
    def _get_team_iterations_impl(
        work_client,
        project_name_or_id: str,
        team_name_or_id: str,
        current: Optional[bool] = None
    ) -> str:
        """
        Implementation of team iterations retrieval.
        
        Args:
            work_client: Work client
            project_name_or_id: The name or ID of the team project
            team_name_or_id: The name or ID of the team
            current: If True, return only the current iteration
                
        Returns:
            Formatted string containing team iteration information
        """
        try:
            # Create a TeamContext object
            team_context = TeamContext(
                project=project_name_or_id,
                team=team_name_or_id
            )
            
            # Set timeframe parameter if current is True
            timeframe = "Current" if current else None
            
            # Get the team iterations
            team_iterations = work_client.get_team_iterations(
                team_context=team_context,
                timeframe=timeframe
            )
            
            if not team_iterations:
                return (f"No iterations found for team {team_name_or_id} "
                        f"in project {project_name_or_id}.")
            
            formatted_iterations = []
            for iteration in team_iterations:
                formatted_iterations.append(_format_team_iteration(iteration))
            
            return "\n\n".join(formatted_iterations)
                
        except Exception as e:
            return f"Error retrieving team iterations: {str(e)}"
  • Supporting helper function to format individual team iteration data into a readable markdown string.
    def _format_team_iteration(iteration) -> str:
        """
        Format team iteration information.
        
        Args:
            iteration: Team iteration object to format
            
        Returns:
            String with team iteration details
        """
        formatted_info = [f"# Iteration: {iteration.name}"]
        
        # Add ID
        if hasattr(iteration, "id") and iteration.id:
            formatted_info.append(f"ID: {iteration.id}")
        
        # Add path
        if hasattr(iteration, "path") and iteration.path:
            formatted_info.append(f"Path: {iteration.path}")
        
        # Add attributes if available
        if hasattr(iteration, "attributes") and iteration.attributes:
            attributes = iteration.attributes
            
            # Add start date
            if hasattr(attributes, "start_date") and attributes.start_date:
                formatted_info.append(f"Start Date: {attributes.start_date}")
            
            # Add finish date
            if hasattr(attributes, "finish_date") and attributes.finish_date:
                formatted_info.append(f"Finish Date: {attributes.finish_date}")
            
            # Add time frame
            if hasattr(attributes, "time_frame") and attributes.time_frame:
                formatted_info.append(f"Time Frame: {attributes.time_frame}")
        
        return "\n".join(formatted_info)
  • Feature-level registration function that calls tools.register_tools(mcp) to register all teams tools, including 'get_team_iterations'.
    def register(mcp):
        """
        Register all teams components with the MCP server.
        
        Args:
            mcp: The FastMCP server instance
        """
        tools.register_tools(mcp)
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes what the tool does (retrieves iterations), explains the Azure DevOps context, and specifies the return format (formatted string as markdown). However, it doesn't mention potential limitations like authentication requirements, rate limits, or error conditions.

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 well-structured with clear sections (purpose, usage scenarios, important context, parameters, returns) and every sentence adds value. It's appropriately sized for a tool with 3 parameters and no annotations, with no redundant information.

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

Completeness4/5

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

For a read operation with 3 parameters and no output schema, the description provides good completeness: clear purpose, usage guidelines, parameter explanations, and return format specification. The main gap is the lack of behavioral details like authentication or error handling, but given the tool's relative simplicity, it's mostly adequate.

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

Parameters4/5

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

With 0% schema description coverage, the description compensates well by explaining all three parameters in the Args section, clarifying their purpose and providing the 'current' parameter's filtering behavior. It adds meaningful context beyond the bare schema, though it doesn't specify format details for project/team identifiers.

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

Purpose5/5

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

The description clearly states the tool's purpose with a specific verb ('Retrieves') and resource ('iterations (sprints) assigned to a specific team'), distinguishing it from sibling tools like get_all_teams or get_team_members. It explicitly defines what iterations are in Azure DevOps context.

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

Usage Guidelines5/5

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

The description provides explicit usage scenarios in a bulleted list (view sprint schedule, find date ranges, determine active iteration, plan work) and includes an IMPORTANT section explaining the broader context of iterations in Azure DevOps. This gives clear guidance on when to use this tool versus alternatives.

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

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/Vortiago/mcp-azure-devops'

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