Skip to main content
Glama
mikusnuz

umami-mcp

update_user

Modify user account details including username, password, or role permissions in Umami Analytics. Requires admin access to update user profiles.

Instructions

Update a user's username, password, or role (admin only)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userIdYesUser UUID
usernameNoNew username
passwordNoNew password
roleNoNew role: 'admin' or 'user'

Implementation Reference

  • The 'update_user' tool is registered and implemented in 'src/tools/users.ts'. The registration includes the schema definition via Zod and the async handler function that calls the Umami API.
    server.tool(
      "update_user",
      "Update a user's username, password, or role (admin only)",
      {
        userId: z.string().describe("User UUID"),
        username: z.string().optional().describe("New username"),
        password: z.string().optional().describe("New password"),
        role: z.string().optional().describe("New role: 'admin' or 'user'"),
      },
      async ({ userId, username, password, role }) => {
        const body: Record<string, unknown> = {};
        if (username !== undefined) body.username = username;
        if (password !== undefined) body.password = password;
        if (role !== undefined) body.role = role;
        const data = await client.call("POST", `/api/users/${userId}`, body);
        return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
      }
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mikusnuz/umami-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server