Skip to main content
Glama
Vortiago
by Vortiago

get_team_members

Retrieve team membership rosters to identify members, administrators, and team composition within Azure DevOps projects.

Instructions

    Retrieves the membership roster for a specific team.
    
    Use this tool when you need to:
    - See who belongs to a particular team
    - Find team administrators
    - Check user assignments across teams
    - Determine team size and composition
    
    Args:
        project_id: The name or ID (GUID) of the team project the team 
            belongs to
        team_id: The name or ID (GUID) of the team
        top: Maximum number of members to return
        skip: Number of members to skip
            
    Returns:
        Formatted string containing team members information including
        display names, emails, IDs, and administrator status, formatted
        as markdown with each member clearly separated
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
team_idYes
topNo
skipNo

Implementation Reference

  • The primary handler function for the 'get_team_members' tool. Decorated with @mcp.tool(), it defines the input parameters (project_id, team_id, top, skip), docstring serving as schema description, retrieves the core client, invokes the helper implementation, and handles client errors.
    def get_team_members(
        project_id: str,
        team_id: str,
        top: Optional[int] = None,
        skip: Optional[int] = None
    ) -> str:
        """
        Retrieves the membership roster for a specific team.
        
        Use this tool when you need to:
        - See who belongs to a particular team
        - Find team administrators
        - Check user assignments across teams
        - Determine team size and composition
        
        Args:
            project_id: The name or ID (GUID) of the team project the team 
                belongs to
            team_id: The name or ID (GUID) of the team
            top: Maximum number of members to return
            skip: Number of members to skip
                
        Returns:
            Formatted string containing team members information including
            display names, emails, IDs, and administrator status, formatted
            as markdown with each member clearly separated
        """
        try:
            core_client = get_core_client()
            return _get_team_members_impl(
                core_client,
                project_id,
                team_id,
                top,
                skip
            )
        except AzureDevOpsClientError as e:
            return f"Error: {str(e)}"
  • Core implementation logic that calls the Azure DevOps CoreClient.get_team_members_with_extended_properties API, formats each member using _format_team_member helper, handles no results and general exceptions.
    def _get_team_members_impl(
        core_client: CoreClient,
        project_id: str,
        team_id: str,
        top: Optional[int] = None,
        skip: Optional[int] = None
    ) -> str:
        """
        Implementation of team members retrieval.
        
        Args:
            core_client: Core client
            project_id: The name or ID (GUID) of the team project the team 
                        belongs to
            team_id: The name or ID (GUID) of the team
            top: Maximum number of members to return
            skip: Number of members to skip
                
        Returns:
            Formatted string containing team members information
        """
        try:
            team_members = core_client.get_team_members_with_extended_properties(
                project_id=project_id,
                team_id=team_id,
                top=top,
                skip=skip
            )
            
            if not team_members:
                return (f"No members found for team {team_id} in "
                        f"project {project_id}.")
            
            formatted_members = []
            for member in team_members:
                formatted_members.append(_format_team_member(member))
            
            return "\n\n".join(formatted_members)
                
        except Exception as e:
            return f"Error retrieving team members: {str(e)}"
  • Helper function to format individual team member information into a readable markdown string, extracting identity details and admin status.
    def _format_team_member(team_member) -> str:
        """
        Format team member information.
        
        Args:
            team_member: Team member object to format
            
        Returns:
            String with team member details
        """
        formatted_info = []
        
        # Get identity information
        if hasattr(team_member, "identity") and team_member.identity:
            identity = team_member.identity
            # Use display name if available, otherwise use ID
            if hasattr(identity, "display_name") and identity.display_name:
                formatted_info.append(f"# Member: {identity.display_name}")
            else:
                formatted_info.append(f"# Member ID: {identity.id}")
                
            # Add ID
            if hasattr(identity, "id") and identity.id:
                formatted_info.append(f"ID: {identity.id}")
                
            # Add descriptor
            if hasattr(identity, "descriptor") and identity.descriptor:
                formatted_info.append(f"Descriptor: {identity.descriptor}")
                
            # Add unique name (email/username)
            if hasattr(identity, "unique_name") and identity.unique_name:
                formatted_info.append(f"Email/Username: {identity.unique_name}")
        else:
            formatted_info.append("# Unknown Member")
        
        # Add team admin status
        if hasattr(team_member, "is_team_admin"):
            is_admin = "Yes" if team_member.is_team_admin else "No"
            formatted_info.append(f"Team Administrator: {is_admin}")
        
        return "\n".join(formatted_info)
  • Registration call that invokes the register_tools function from tools.py, which defines and registers the get_team_members tool among others.
    tools.register_tools(mcp)
Behavior3/5

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

No annotations are provided, so the description carries full burden. It discloses that the tool retrieves data (implied read-only) and describes the return format (markdown with specific fields), which is helpful. However, it doesn't mention potential limitations like permissions needed, rate limits, pagination behavior beyond top/skip, or error conditions. For a read operation with no annotations, this is adequate but leaves gaps.

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 guidelines, args, returns) and uses bullet points efficiently. It's appropriately sized for a 4-parameter tool, though the usage guidelines could be more concise (e.g., combining points). Every sentence adds value, 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?

Given no annotations, no output schema, and 4 parameters with 0% schema coverage, the description does a good job: it explains purpose, usage, parameters, and return format. However, it lacks details on authentication, error handling, or example outputs, which would help an agent use it correctly in complex scenarios. For a read tool, this is mostly complete but not exhaustive.

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?

Schema description coverage is 0%, so the description must compensate. It provides clear semantics for all four parameters: project_id and team_id as identifiers (with name/GUID clarification), and top/skip for pagination control. This adds significant value beyond the bare schema, though it doesn't detail default values or constraints (e.g., top/skip being optional/nullable).

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 ('membership roster for a specific team'), distinguishing it from siblings like get_all_teams (which lists teams rather than members) and get_team_area_paths/get_team_iterations (which focus on other team attributes). The title is null, so the description fully carries this burden.

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 explicitly provides four bullet points detailing when to use this tool: to see team membership, find administrators, check user assignments, and determine team composition. This gives clear context for selection, though it doesn't explicitly state when not to use it or name alternatives (like querying users directly if available).

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