Skip to main content
Glama
mrwyndham

PocketBase MCP Server

create_user

Create new user accounts in PocketBase databases by providing email, password, and user details for authentication setup.

Instructions

Create a new user account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailYesUser email
passwordYesUser password
passwordConfirmYesPassword confirmation
nameNoUser name
collectionNoCollection name (default: users)users

Implementation Reference

  • The handler function that executes the create_user tool. It creates a new user in the specified PocketBase collection using the pb.collection().create() method with the provided arguments.
    private async createUser(args: any) {
      try {
        const collection = args.collection || 'users';
        const result = await this.pb.collection(collection).create({
          email: args.email,
          password: args.password,
          passwordConfirm: args.passwordConfirm,
          name: args.name,
        });
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(result, null, 2),
            },
          ],
        };
      } catch (error: unknown) {
        throw new McpError(
          ErrorCode.InternalError,
          `Failed to create user: ${pocketbaseErrorMessage(error)}`
        );
      }
    }
  • Input schema definition for the create_user tool, specifying properties and required fields.
    inputSchema: {
      type: 'object',
      properties: {
        email: {
          type: 'string',
          description: 'User email',
        },
        password: {
          type: 'string',
          description: 'User password',
        },
        passwordConfirm: {
          type: 'string',
          description: 'Password confirmation',
        },
        name: {
          type: 'string',
          description: 'User name',
        },
        collection: {
          type: 'string',
          description: 'Collection name (default: users)',
          default: 'users'
        }
      },
      required: ['email', 'password', 'passwordConfirm'],
    },
  • src/index.ts:546-576 (registration)
    Tool registration in the ListTools response, including name, description, and reference to inputSchema.
    {
      name: 'create_user',
      description: 'Create a new user account',
      inputSchema: {
        type: 'object',
        properties: {
          email: {
            type: 'string',
            description: 'User email',
          },
          password: {
            type: 'string',
            description: 'User password',
          },
          passwordConfirm: {
            type: 'string',
            description: 'Password confirmation',
          },
          name: {
            type: 'string',
            description: 'User name',
          },
          collection: {
            type: 'string',
            description: 'Collection name (default: users)',
            default: 'users'
          }
        },
        required: ['email', 'password', 'passwordConfirm'],
      },
    },
  • src/index.ts:685-686 (registration)
    Dispatch/registration case in the CallToolRequest handler that routes to the createUser method.
    case 'create_user':
      return await this.createUser(request.params.arguments);
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the action ('Create') which implies a write/mutation operation, but doesn't mention permissions required, whether it's idempotent, what happens on duplicate emails, or what the response looks like. For a user creation tool with zero annotation coverage, this leaves significant behavioral 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 a single, efficient sentence that gets straight to the point. Every word earns its place - 'Create' (action), 'new' (state), 'user account' (resource). No wasted words or unnecessary elaboration. Perfectly front-loaded and concise.

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?

For a user creation tool with 5 parameters, no annotations, and no output schema, the description is insufficient. It doesn't address authentication requirements, error conditions, return values, or how this differs from similar creation tools. The agent lacks critical context needed to use this tool effectively in a real system.

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 all parameters are documented in the schema. The description doesn't add any parameter-specific information beyond what's in the schema. It doesn't explain relationships between parameters (like password/passwordConfirm validation) or provide additional context. Baseline 3 is appropriate when schema does the heavy lifting.

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 ('new user account'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'create_record' or 'create_collection', but the specificity of 'user account' provides reasonable distinction. No tautology or misleading elements are present.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (like authentication), when not to use it, or how it differs from similar tools like 'create_record' or 'create_collection'. The agent must infer usage from context alone.

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/mrwyndham/pocketbase-mcp'

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