Skip to main content
Glama

create-users

Add one or more users to your n8n instance with specified email addresses and roles, enabling team collaboration and access management.

Instructions

Create one or more users in your instance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientIdYes
usersYes

Implementation Reference

  • MCP tool handler for 'create-users': retrieves N8nClient by clientId, validates existence, calls client.createUsers(users), returns result or error.
    case "create-users": {
      const { clientId, users } = args as { 
        clientId: string; 
        users: Array<{ 
          email: string; 
          role?: 'global:admin' | 'global:member'
        }> 
      };
      const client = clients.get(clientId);
      if (!client) {
        return {
          content: [{
            type: "text",
            text: "Client not initialized. Please run init-n8n first.",
          }],
          isError: true
        };
      }
    
      try {
        const result = await client.createUsers(users);
        return {
          content: [{
            type: "text",
            text: JSON.stringify(result, null, 2),
          }]
        };
      } catch (error) {
        return {
          content: [{
            type: "text",
            text: error instanceof Error ? error.message : "Unknown error occurred",
          }],
          isError: true
        };
      }
    }
  • Input schema for 'create-users' tool specifying clientId and array of users with email (required) and optional role.
    inputSchema: {
      type: "object",
      properties: {
        clientId: { type: "string" },
        users: {
          type: "array",
          items: {
            type: "object",
            properties: {
              email: { type: "string" },
              role: { 
                type: "string",
                enum: ["global:admin", "global:member"]
              }
            },
            required: ["email"]
          }
        }
      },
      required: ["clientId", "users"]
    }
  • src/index.ts:567-590 (registration)
    Registration of 'create-users' tool in the ListTools response, including name, description, and input schema.
      name: "create-users",
      description: "Create one or more users in your instance.",
      inputSchema: {
        type: "object",
        properties: {
          clientId: { type: "string" },
          users: {
            type: "array",
            items: {
              type: "object",
              properties: {
                email: { type: "string" },
                role: { 
                  type: "string",
                  enum: ["global:admin", "global:member"]
                }
              },
              required: ["email"]
            }
          }
        },
        required: ["clientId", "users"]
      }
    },
  • N8nClient helper method createUsers that sends POST request to /users with array of user objects.
    async createUsers(users: Array<{ email: string; role?: 'global:admin' | 'global:member' }>): Promise<any> {
      return this.makeRequest('/users', {
        method: 'POST',
        body: JSON.stringify(users),
      });
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions 'Create' which implies a mutation, but doesn't disclose behavioral traits like whether it requires authentication, rate limits, what happens on duplicate emails, or the format of the response. For a mutation tool with zero annotation coverage, this is a significant gap.

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 a single, efficient sentence that is front-loaded with the core action. There is no wasted text, making it highly concise and well-structured for quick understanding.

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

Completeness2/5

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

Given the complexity of creating users (a mutation with 2 parameters), no annotations, and no output schema, the description is incomplete. It lacks details on permissions, error handling, response format, and parameter semantics, making it inadequate for safe and effective use by an AI agent.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It doesn't explain the parameters 'clientId' or 'users', their purposes, or the structure of user objects (e.g., email and role). The description adds no meaning beyond the schema, failing to address the coverage gap.

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

Purpose4/5

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

The description clearly states the action ('Create') and resource ('users'), specifying it can handle 'one or more users'. It distinguishes from sibling tools like 'delete-user' and 'get-user' by focusing on creation. However, it doesn't specify what 'instance' refers to, leaving some ambiguity.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites, such as needing admin permissions, or when to choose this over other user-related tools like 'update-user' (if it existed) or 'list-users'. The description only states what it does, not when to use it.

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/illuminaresolutions/n8n-mcp-server'

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