create_user
Add new users to Umami Analytics with specified roles and credentials for team access management.
Instructions
Create a new user (admin only)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| username | Yes | Username for the new user | |
| password | Yes | Password for the new user | |
| role | No | User role: 'admin' or 'user' (default: 'user') |
Implementation Reference
- src/tools/users.ts:26-40 (handler)The 'create_user' tool definition and handler implementation using the UmamiClient to make a POST request to /api/users.
server.tool( "create_user", "Create a new user (admin only)", { username: z.string().describe("Username for the new user"), password: z.string().describe("Password for the new user"), role: z.string().optional().describe("User role: 'admin' or 'user' (default: 'user')"), }, async ({ username, password, role }) => { const body: Record<string, unknown> = { username, password }; if (role) body.role = role; const data = await client.call("POST", "/api/users", body); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } );