Skip to main content
Glama
InditexTech

MCP Microsoft Teams Server

by InditexTech

list_members

Retrieve a list of all team members in Microsoft Teams to manage team composition and contact information.

Instructions

List all members in the team

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler for 'list_members'. Decorated with @mcp.tool, it calls client.list_members() and returns a list of TeamsMember objects.
    @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()
  • TeamsClient.list_members() method - the core implementation. Uses TeamsInfo.get_paged_team_members via the bot adapter to fetch all team members and returns them 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):
                continuation_token = ""
                try:
                    members = await TeamsInfo.get_paged_team_members(
                        context, self.teams_channel_id, 10, continuation_token
                    )
                    for member in members.members:
                        result.append(TeamsMember(name=member.name, email=member.email))
                except Exception as e:
                    LOGGER.error(f"Error getting members: {str(e)}")
    
            await self.adapter.continue_conversation(
                agent_app_id=self.teams_app_id,
                continuation_activity=self._create_continuation_activity(),
                callback=list_members_callback,
            )
            return result
        except Exception as e:
            LOGGER.error(f"Error listing members: {str(e)}")
            raise
  • TeamsMember Pydantic model - defines the schema for a team member 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")
  • Registration of the 'list_members' tool via the @mcp.tool decorator with name and description.
    @mcp.tool(name="list_members", description="List all members in the team")
Behavior2/5

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

No annotations are provided, so the description carries the full burden for behavioral disclosure. It does not mention permissions, rate limits, pagination, or any side effects, leaving important details about tool behavior unaddressed.

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, front-loaded sentence with no wasted words. It is appropriately concise for a simple tool with no parameters.

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 the tool's simplicity (no parameters) and the presence of an output schema (which likely defines return structure), the description is nearly complete. It could mention that the output is a list, but the schema covers that.

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?

The input schema has zero parameters, so baseline is 4. The description adds no parameter information, but none is needed.

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 'List all members in the team' uses a specific verb 'List' and a clear resource 'members'. It distinguishes from sibling tools like 'get_member_by_name', which likely retrieves a single member.

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?

No guidance on when to use this tool versus alternatives such as 'get_member_by_name'. The description simply states what it does, without context or exclusions.

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

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