list_teams_tool
Retrieve a paginated list of teams associated with your Fathom account to manage team members and access organizational data.
Instructions
Return a paginated list of teams associated with the account.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cursor | No | Pagination cursor |
Implementation Reference
- tools/teams.py:5-44 (handler)Core handler function implementing the list_teams tool logic: fetches paginated teams from Fathom API using the provided cursor.async def list_teams( ctx: Context, cursor: Optional[str] = None ) -> dict: """Retrieve paginated list of teams in the organization. Returns team records that can be used for filtering meetings and team members. Team names from this endpoint can be used as values for the 'teams' parameter in list_meetings and 'team' parameter in list_team_members. Args: ctx: MCP context for logging cursor: Pagination cursor from previous response for next page Returns: dict: { "items": [Team objects with name and metadata], "limit": int (default 10), "cursor": str (for pagination, null if no more results) } """ try: await ctx.info("Fetching teams from Fathom API") # Build parameters params = {} if cursor: params["cursor"] = cursor result = await client.get_teams(params=params if params else None) await ctx.info("Successfully retrieved teams") 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 teams: {str(e)}") raise e
- server.py:137-149 (registration)MCP tool registration for list_teams (referred to as list_teams_tool in examples), defines input schema with Pydantic Field and delegates to the handler in tools.teams.@mcp.tool async def list_teams( ctx: Context, cursor: str = Field(default=None, description="Pagination cursor") ) -> Dict[str, Any]: """Retrieve paginated list of teams with organizational structure. Examples: list_teams_tool() # Get first page of teams list_teams_tool(cursor="abc123") # Get next page using cursor """ return await tools.teams.list_teams(ctx, cursor)
- server.py:138-141 (schema)Input schema definition for the tool using Pydantic Field for the cursor parameter.async def list_teams( ctx: Context, cursor: str = Field(default=None, description="Pagination cursor") ) -> Dict[str, Any]: