add_team_user
Add a user to a team in Umami Analytics by specifying team ID, user ID, and role (team-owner or team-member) to manage team access and permissions.
Instructions
Add a user to a team
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| teamId | Yes | Team UUID | |
| userId | Yes | User UUID to add | |
| role | Yes | Role in the team: 'team-owner' or 'team-member' |
Implementation Reference
- src/tools/teams.ts:106-118 (handler)The handler logic for 'add_team_user', which uses the UmamiClient to make a POST request to add a user to a team.
server.tool( "add_team_user", "Add a user to a team", { teamId: z.string().describe("Team UUID"), userId: z.string().describe("User UUID to add"), role: z.string().describe("Role in the team: 'team-owner' or 'team-member'"), }, async ({ teamId, userId, role }) => { const data = await client.call("POST", `/api/teams/${teamId}/users`, { userId, role }); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } );