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 };
        }
      }
    );
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the superuser privilege requirement, which is valuable context, but doesn't cover other aspects like what happens on success/failure, whether the operation is idempotent, or rate limits. It's adequate but has clear gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences with zero waste—it states the purpose and a key constraint efficiently. Every word earns its place, and it's front-loaded with the core action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a creation tool with no annotations and no output schema, the description is minimal but covers the essential action and privilege requirement. However, it lacks details on return values, error conditions, or side effects, which would be helpful given the tool's complexity (7 parameters). It's viable but incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 7 parameters thoroughly. The description doesn't add any parameter-specific details beyond what the schema provides, such as explaining interactions between parameters (e.g., superuser and manager). Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Create a new Crafty Controller user account') with the resource ('user account'), distinguishing it from sibling tools like user_update, user_delete, and user_list. It's precise about what the tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit context for when to use this tool ('Requires superuser privileges'), indicating prerequisites. However, it doesn't mention when not to use it or name alternatives like user_update for modifying existing users, which would make it a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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