Skip to main content
Glama

user_create

Create new user accounts in Crafty Controller with customizable permissions, language, and theme settings for system administration.

Instructions

Create a new Crafty Controller user account. Requires superuser privileges.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameYesUsername
passwordYesPassword
emailNoEmail address
langNoLanguage code (e.g. 'en', 'fr', 'de')en
superuserNoGrant superuser privileges
themeNoUI theme
managerNoManager user ID (assigns a manager to this user)

Implementation Reference

  • The "user_create" tool is registered and implemented within the registerUserTools function in src/tools/users.ts, utilizing the CraftyClient to send a POST request to the "/users" endpoint.
    server.tool(
      "user_create",
      "Create a new Crafty Controller user account. Requires superuser privileges.",
      {
        username: z.string().describe("Username"),
        password: z.string().describe("Password"),
        email: z.string().email().optional().describe("Email address"),
        lang: z.string().default("en").describe("Language code (e.g. 'en', 'fr', 'de')"),
        superuser: z.boolean().default(false).describe("Grant superuser privileges"),
        theme: z.string().optional().describe("UI theme"),
        manager: z
          .number()
          .optional()
          .describe("Manager user ID (assigns a manager to this user)"),
      },
      async (userData) => {
        try {
          const data = await client.post("/users", userData);
          return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
        } catch (error) {
          const msg = error instanceof Error ? error.message : String(error);
          return { content: [{ type: "text", text: `Error: ${msg}` }], isError: true };
        }
      }
    );

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/HadiCherkaoui/crafty-mcp'

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