Skip to main content
Glama
Vortiago
by Vortiago

get_team_area_paths

Retrieve area paths assigned to a specific team to understand their work responsibilities and configure boards and backlogs in Azure DevOps.

Instructions

    Retrieves the area paths assigned to a specific team.
    
    Use this tool when you need to:
    - Understand a team's areas of responsibility
    - Check default area path assignments
    - Determine how work is classified and routed to teams
    - Set up board and backlog configurations
    
    IMPORTANT: Area paths in Azure DevOps determine which work items appear
    on a team's backlogs and boards. The default area path is used when
    creating new work items through a team's interface.
    
    Args:
        project_name_or_id: The name or ID of the team project
        team_name_or_id: The name or ID of the team
            
    Returns:
        Formatted string containing team area path information including
        the default area path and all assigned paths, with indicators for
        paths that include sub-areas
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_name_or_idYes
team_name_or_idYes

Implementation Reference

  • Core handler implementation that executes the tool logic: creates TeamContext, calls Azure DevOps WorkClient.get_team_field_values to retrieve team area paths, handles errors, and formats the result using a helper function.
    def _get_team_area_paths_impl(
        work_client,
        project_name_or_id: str,
        team_name_or_id: str
    ) -> str:
        """
        Implementation of team area paths 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
                
        Returns:
            Formatted string containing team area path information
        """
        try:
            # Create a TeamContext object
            team_context = TeamContext(
                project=project_name_or_id,
                team=team_name_or_id
            )
            
            # Get the team field values
            team_field_values = work_client.get_team_field_values(team_context)
            
            if not team_field_values:
                return (f"No area paths found for team {team_name_or_id} "
                        f"in project {project_name_or_id}.")
            
            return _format_team_area_path(team_field_values)
                
        except Exception as e:
            return f"Error retrieving team area paths: {str(e)}"
  • MCP tool registration and public handler function decorated with @mcp.tool(), including schema description in docstring, parameter definitions, and delegation to the core implementation.
    @mcp.tool()
    def get_team_area_paths(
        project_name_or_id: str,
        team_name_or_id: str
    ) -> str:
        """
        Retrieves the area paths assigned to a specific team.
        
        Use this tool when you need to:
        - Understand a team's areas of responsibility
        - Check default area path assignments
        - Determine how work is classified and routed to teams
        - Set up board and backlog configurations
        
        IMPORTANT: Area paths in Azure DevOps determine which work items appear
        on a team's backlogs and boards. The default area path is used when
        creating new work items through a team's interface.
        
        Args:
            project_name_or_id: The name or ID of the team project
            team_name_or_id: The name or ID of the team
                
        Returns:
            Formatted string containing team area path information including
            the default area path and all assigned paths, with indicators for
            paths that include sub-areas
        """
        try:
            work_client = get_work_client()
            return _get_team_area_paths_impl(
                work_client,
                project_name_or_id,
                team_name_or_id
            )
        except AzureDevOpsClientError as e:
            return f"Error: {str(e)}"
  • Helper function to format the retrieved team field values into a structured markdown string showing default and all area paths with include_children indicators.
    def _format_team_area_path(team_field_values) -> str:
        """
        Format team area path information.
        
        Args:
            team_field_values: Team field values object to format
            
        Returns:
            String with team area path details
        """
        formatted_info = ["# Team Area Paths"]
        
        # Add default area path
        if (hasattr(team_field_values, "default_value") and 
                team_field_values.default_value):
            formatted_info.append(
                f"Default Area Path: {team_field_values.default_value}")
        
        # Add all area paths
        if hasattr(team_field_values, "values") and team_field_values.values:
            formatted_info.append("\n## All Area Paths:")
            for area_path in team_field_values.values:
                value_str = f"- {area_path.value}"
                if (hasattr(area_path, "include_children") and 
                        area_path.include_children):
                    value_str += " (Including sub-areas)"
                formatted_info.append(value_str)
        
        return "\n".join(formatted_info)
  • Registration entry point for the teams feature, which calls tools.register_tools(mcp) to register all team tools including get_team_area_paths.
    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