Skip to main content
Glama
InditexTech

MCP Microsoft Teams Server

by InditexTech

list_members

Retrieve a list of all members in a specified Microsoft Teams team, including their names and IDs.

Instructions

List all members in the team

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool registration for list_members that delegates to TeamsClient.list_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()
  • Core handler that initializes the adapter, uses TeamsInfo.get_paged_team_members to fetch team members, and returns a list of 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
  • Schema/model 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")
  • Inner callback function passed to continue_conversation that performs the actual TeamsInfo API call to get paged team members
    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,
    )
Behavior2/5

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

With no annotations provided, the description carries the full burden. It only states 'List all members' without disclosing authorization needs, rate limits, or what happens if the team is empty. Behavioral traits are missing.

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 a single sentence, concise and front-loaded. It is appropriately sized for a simple tool, though it could include a bit more context.

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 zero parameters and the existence of an output schema (which documents return values), the description is reasonably complete. It states the core purpose and scope, sufficient for a basic list-all tool.

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?

There are zero parameters, so the baseline is 4. The description adds no parameter info, 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 explicitly states 'List all members in the team', which clearly identifies the action (list), resource (members), and scope (all in team). It distinguishes from siblings like get_member_by_name (individual member lookup) and list_threads (different resource).

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 is provided on when to use this tool versus alternatives like get_member_by_name or list_threads. There is no mention of limitations or when not to use it.

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