list_team_members_tool
Retrieve a paginated list of team members with optional filtering by team name to manage and organize team structures.
Instructions
Return a paginated list of team members; supports optional filtering by team name.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cursor | No | Pagination cursor | |
| team | No | Filter by team name |
Implementation Reference
- tools/team_members.py:5-47 (handler)The core handler function that fetches team members from the Fathom API, handles pagination and team filtering, with error handling and logging via ctx.async def list_team_members( ctx: Context, cursor: Optional[str] = None, team: Optional[str] = None ) -> dict: """Retrieve paginated list of team members with optional team filtering. Returns team member records that can be used to identify meeting participants and recording metadata. Args: ctx: MCP context for logging cursor: Pagination cursor from previous response for next page team: Filter members by specific team name (case-sensitive) Returns: dict: { "items": [Team member objects with name, email, and team associations], "limit": int (default 10), "cursor": str (for pagination, null if no more results) } """ try: await ctx.info("Fetching team members from Fathom API") # Build parameters params = {} if cursor: params["cursor"] = cursor if team: params["team"] = team result = await client.get_team_members(params=params if params else None) await ctx.info("Successfully retrieved team members") return result except FathomAPIError as e: await ctx.error(f"Fathom API error: {e.message}") raise e except Exception as e: await ctx.error(f"Unexpected error fetching team members: {str(e)}") raise e
- server.py:151-164 (registration)MCP tool registration using @mcp.tool decorator, including schema via Pydantic Field descriptions and docstring examples. Delegates to the handler in tools.team_members.async def list_team_members( ctx: Context, cursor: str = Field(default=None, description="Pagination cursor"), team: str = Field(default=None, description="Filter by team name") ) -> Dict[str, Any]: """Retrieve paginated team members with optional team filtering. Examples: list_team_members_tool() # Get all team members across all teams list_team_members_tool(team="Engineering") # Filter members by team name list_team_members_tool(cursor="def456") # Paginate through member list """ return await tools.team_members.list_team_members(ctx, cursor, team)
- server.py:152-155 (schema)Input schema defined using Pydantic Field with descriptions for cursor and team parameters.ctx: Context, cursor: str = Field(default=None, description="Pagination cursor"), team: str = Field(default=None, description="Filter by team name") ) -> Dict[str, Any]: