Skip to main content
Glama
InditexTech

MCP Microsoft Teams Server

by InditexTech

list_members

Retrieve a comprehensive list of all members within a Microsoft Teams group using the MCP Microsoft Teams Server integration.

Instructions

List all members in the team

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for 'list_members' that gets the TeamsClient from context and calls its list_members method to return list of team members.
    @mcp.tool(name="list_members", description="List all members in the team")
    async def list_members(ctx: Context) -> list[TeamsMember]:
        await ctx.debug("list_members")
        client = _get_teams_client(ctx)
        return await client.list_members()
  • Pydantic model defining the output schema for TeamsMember with name and email fields.
    class TeamsMember(BaseModel):
        name: str = Field(
            description="Member name used in mentions and user information cards"
        )
        email: str = Field(description="Member email")
  • TeamsClient helper method that initializes the bot adapter and uses TeamsInfo.get_team_members to fetch and return list of team members as TeamsMember objects.
    async def list_members(self) -> list[TeamsMember]:
        """List all members in the configured team.
    
        Returns:
            List of team member details
        """
        try:
            await self._initialize()
            result = []
    
            async def list_members_callback(context: TurnContext):
                members = await TeamsInfo.get_team_members(context, self.team_id)
                for member in members:
                    result.append(TeamsMember(name=member.name, email=member.email))
    
            await self.adapter.continue_conversation(
                bot_app_id=self.teams_app_id,
                reference=self._create_conversation_reference(),
                callback=list_members_callback,
            )
            return result
        except Exception as e:
            LOGGER.error(f"Error listing members: {str(e)}")
            raise
  • Registration of the list_members tool via FastMCP @mcp.tool decorator.
    @mcp.tool(name="list_members", description="List all members in the team")
    async def list_members(ctx: Context) -> list[TeamsMember]:
        await ctx.debug("list_members")
        client = _get_teams_client(ctx)
        return await client.list_members()
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic action. It doesn't disclose behavioral traits like whether this is a read-only operation, how results are returned (e.g., pagination, sorting), or any rate limits or permissions required.

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 a single, clear sentence with no wasted words. It's front-loaded with the core action and resource, making it efficient and easy to parse.

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

Completeness3/5

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

For a simple list tool with no parameters and no output schema, the description is minimally adequate but lacks details on behavioral context. Without annotations or output schema, it should ideally mention what information is returned (e.g., member IDs, names) or usage constraints to be more complete.

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?

Since there are 0 parameters and schema description coverage is 100%, the baseline is 4. The description appropriately doesn't mention any parameters, which aligns with the input schema showing no required inputs.

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

Purpose4/5

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

The description clearly states the verb ('List') and resource ('all members in the team'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_member_by_name', which would require a 5.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'get_member_by_name' for retrieving a specific member. It also doesn't mention any prerequisites or contextual constraints for usage.

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

Related 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/InditexTech/mcp-teams-server'

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