Skip to main content
Glama

get_team_iterations

Retrieve sprint details for a specific team in Azure DevOps, including active, past, and future iterations. Use this tool to view sprint schedules, date ranges, and plan work based on the team's iteration calendar.

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
currentNo
project_name_or_idYes
team_name_or_idYes

Implementation Reference

  • Primary MCP tool handler for get_team_iterations. Decorated with @mcp.tool(), processes input parameters, retrieves work client, calls internal implementation, and returns formatted results or error.
    @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 implementing the logic to fetch team iterations from Azure DevOps work_client.get_team_iterations API, handles current timeframe filter, formats output using _format_team_iteration.
    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)}"
  • Helper function to format a single team iteration object into a markdown string including name, ID, path, dates, and time frame.
    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)
  • Registration entry point for teams feature that calls tools.register_tools(mcp) to register the get_team_iterations tool among others.
    def register(mcp): """ Register all teams components with the MCP server. Args: mcp: The FastMCP server instance """ tools.register_tools(mcp)

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