Skip to main content
Glama
Vortiago
by Vortiago

get_all_teams

Retrieve all teams in your Azure DevOps organization to get an overview of team names, IDs, and associated projects for operational use.

Instructions

    Retrieves all teams in the Azure DevOps organization.
    
    Use this tool when you need to:
    - Get an overview of all teams across projects
    - Find team IDs for use in other operations
    - Determine which teams exist in the organization
    - Locate specific teams by name
    
    Args:
        user_is_member_of: If true, return only teams where the current 
            user is a member. Otherwise return all teams the user 
            has read access to.
        top: Maximum number of teams to return
        skip: Number of teams to skip
            
    Returns:
        Formatted string containing team information including names,
        IDs, descriptions, and associated projects, formatted as
        markdown with each team clearly separated
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_is_member_ofNo
topNo
skipNo

Implementation Reference

  • The primary MCP tool handler function for 'get_all_teams', decorated with @mcp.tool(). It retrieves the CoreClient and calls the internal implementation _get_all_teams_impl, handling AzureDevOpsClientError.
    def get_all_teams(
        user_is_member_of: Optional[bool] = None,
        top: Optional[int] = None,
        skip: Optional[int] = None
    ) -> str:
        """
        Retrieves all teams in the Azure DevOps organization.
        
        Use this tool when you need to:
        - Get an overview of all teams across projects
        - Find team IDs for use in other operations
        - Determine which teams exist in the organization
        - Locate specific teams by name
        
        Args:
            user_is_member_of: If true, return only teams where the current 
                user is a member. Otherwise return all teams the user 
                has read access to.
            top: Maximum number of teams to return
            skip: Number of teams to skip
                
        Returns:
            Formatted string containing team information including names,
            IDs, descriptions, and associated projects, formatted as
            markdown with each team clearly separated
        """
        try:
            core_client = get_core_client()
            return _get_all_teams_impl(
                core_client, 
                user_is_member_of,
                top,
                skip
            )
        except AzureDevOpsClientError as e:
            return f"Error: {str(e)}"
  • Core helper function implementing the logic to fetch all teams using Azure DevOps CoreClient.get_all_teams(), format each team with _format_team, and handle errors.
    def _get_all_teams_impl(
        core_client: CoreClient,
        user_is_member_of: Optional[bool] = None,
        top: Optional[int] = None,
        skip: Optional[int] = None,
        expand_identity: Optional[bool] = None
    ) -> str:
        """
        Implementation of teams retrieval.
        
        Args:
            core_client: Core client
            user_is_member_of: If true, then return all teams requesting user is
                              member. Otherwise return all teams user has read 
                              access.
            top: Maximum number of teams to return
            skip: Number of teams to skip
                
        Returns:
            Formatted string containing team information
        """
        try:
            # Call the SDK function - note we're mapping user_is_member_of to mine
            # param
            teams = core_client.get_all_teams(
                mine=user_is_member_of,
                top=top,
                skip=skip
            )
            
            if not teams:
                return "No teams found."
            
            formatted_teams = []
            for team in teams:
                formatted_teams.append(_format_team(team))
            
            return "\n\n".join(formatted_teams)
                
        except Exception as e:
            return f"Error retrieving teams: {str(e)}"
  • Helper function to format individual team information into a markdown string, used by _get_all_teams_impl.
    def _format_team(team: WebApiTeam) -> str:
        """
        Format team information.
        
        Args:
            team: Team object to format
            
        Returns:
            String with team details
        """
        # Basic information that should always be available
        formatted_info = [f"# Team: {team.name}"]
        formatted_info.append(f"ID: {team.id}")
        
        # Add description if available
        if hasattr(team, "description") and team.description:
            formatted_info.append(f"Description: {team.description}")
        
        # Add project information if available
        if hasattr(team, "project_name") and team.project_name:
            formatted_info.append(f"Project: {team.project_name}")
        
        if hasattr(team, "project_id") and team.project_id:
            formatted_info.append(f"Project ID: {team.project_id}")
        
        
        return "\n".join(formatted_info)
  • Registration entry point for the teams feature, which calls tools.register_tools(mcp) to register the get_all_teams tool and others.
    def register(mcp):
        """
        Register all teams components with the MCP server.
        
        Args:
            mcp: The FastMCP server instance
        """
        tools.register_tools(mcp)
  • The register_tools function that defines and registers the get_all_teams tool using @mcp.tool() decorator when called.
    def register_tools(mcp) -> None:
        """
        Register team tools with the MCP server.
        
        Args:
            mcp: The FastMCP server instance
        """
        
        @mcp.tool()
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by explaining access control behavior ('return all teams the user has read access to'), pagination behavior (top/skip parameters), and return format ('formatted as markdown with each team clearly separated'). It doesn't mention rate limits or authentication requirements, but covers key behavioral aspects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (purpose, usage scenarios, parameters, returns) and front-loaded information. The bullet points could be slightly more concise, but overall it's efficient with minimal waste.

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 no annotations and no output schema, the description provides comprehensive context: clear purpose, usage guidelines, parameter explanations, and return format details. It doesn't explicitly mention error conditions or performance characteristics, but covers most essential aspects.

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

Parameters5/5

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

With 0% schema description coverage, the description fully compensates by explaining all three parameters: 'user_is_member_of' clarifies filtering logic, 'top' specifies maximum return count, and 'skip' explains pagination offset. This adds substantial meaning beyond the bare schema.

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 specific verb ('Retrieves') and resource ('all teams in the Azure DevOps organization'). It distinguishes this tool from siblings like get_team_members or get_team_iterations by focusing on team listing rather than team-specific details.

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 bullet points: 'Get an overview of all teams across projects', 'Find team IDs for use in other operations', 'Determine which teams exist', and 'Locate specific teams by name'. 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