get_user_teams
Retrieve teams associated with a specific user for administrative oversight and access management.
Instructions
Get the list of teams a user belongs to (admin only)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| userId | Yes | User UUID | |
| page | No | Page number (1-based) | |
| pageSize | No | Results per page | |
| query | No | Search query to filter teams |
Implementation Reference
- src/tools/users.ts:121-138 (handler)The handler for the 'get_user_teams' tool, defined within the 'registerUserTools' function. It calls the Umami API to fetch team lists for a specific user.
server.tool( "get_user_teams", "Get the list of teams a user belongs to (admin only)", { userId: z.string().describe("User UUID"), page: z.number().optional().describe("Page number (1-based)"), pageSize: z.number().optional().describe("Results per page"), query: z.string().optional().describe("Search query to filter teams"), }, async ({ userId, page, pageSize, query }) => { const data = await client.call("GET", `/api/users/${userId}/teams`, undefined, { page, pageSize, query, }); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } );