list_teams
Retrieve and filter teams from Umami Analytics with pagination, search queries, and sorting options for team management.
Instructions
List all teams
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number (1-based) | |
| pageSize | No | Results per page (default 10) | |
| query | No | Search query to filter teams | |
| orderBy | No | Field to order by (e.g. 'name', 'createdAt') |
Implementation Reference
- src/tools/teams.ts:15-23 (handler)The handler function for the "list_teams" MCP tool, which calls the Umami client to fetch team data from the /api/teams endpoint.
async ({ page, pageSize, query, orderBy }) => { const data = await client.call("GET", "/api/teams", undefined, { page, pageSize, query, orderBy, }); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } - src/tools/teams.ts:6-14 (registration)Registration of the "list_teams" tool using the McpServer instance within the registerTeamTools function.
server.tool( "list_teams", "List all teams", { page: z.number().optional().describe("Page number (1-based)"), pageSize: z.number().optional().describe("Results per page (default 10)"), query: z.string().optional().describe("Search query to filter teams"), orderBy: z.string().optional().describe("Field to order by (e.g. 'name', 'createdAt')"), },