Skip to main content
Glama
yvanfreitas

MCP Test Server

by yvanfreitas

create_user

Add new users to the MCP Test Server by providing name, email, and role parameters for user management.

Instructions

Create a new user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesUser name
emailYesUser email
roleNoUser roleuser

Implementation Reference

  • Implements the core logic for creating a new user: validates input, generates ID, adds to mock data store, returns success response.
    static create(userData) {
      const { name, email, role = 'user' } = userData;
    
      if (!name || !email) {
        return {
          success: false,
          message: 'Name and email are required'
        };
      }
    
      const newUser = {
        id: Math.max(...users.map(u => u.id)) + 1,
        name,
        email,
        role
      };
    
      users.push(newUser);
    
      return {
        success: true,
        message: 'User created successfully',
        data: newUser
      };
    }
  • Defines the input schema for the create_user tool, specifying required name and email, optional role.
    {
      name: 'create_user',
      description: 'Create a new user',
      inputSchema: {
        type: 'object',
        properties: {
          name: {
            type: 'string',
            description: 'User name'
          },
          email: {
            type: 'string',
            description: 'User email'
          },
          role: {
            type: 'string',
            description: 'User role',
            enum: ['admin', 'user', 'moderator'],
            default: 'user'
          }
        },
        required: ['name', 'email']
      }
    }
  • mcp-server.js:58-59 (registration)
    Registers the create_user tool handler by dispatching tool calls to UserService.create in the MCP call tool request handler.
    case 'create_user':
      return createMcpResponse(UserService.create(args));
  • mcp-server.js:38-46 (registration)
    Registers the tool list handler which exposes the create_user schema via userToolSchemas.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [
          ...userToolSchemas,
          ...taskToolSchemas,
          searchToolSchema
        ]
      };
    });
  • Utility function that formats the tool execution result into the required MCP response structure.
    export function createMcpResponse(data) {
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(data, null, 2)
          }
        ]
      };
    }
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. 'Create a new user' implies a write operation but lacks critical details: it doesn't specify required permissions, whether the operation is idempotent, what happens on duplicate emails, or what the response contains. This leaves significant behavioral gaps for a mutation tool.

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 extremely concise at just three words, with zero wasted language. It's front-loaded with the core action and resource, making it efficient for quick understanding, though this brevity contributes to gaps in other dimensions.

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 no annotations and no output schema, the description is insufficient. It doesn't address behavioral aspects like authentication needs, error conditions, or return values, nor does it provide usage context relative to sibling tools. The 100% schema coverage helps with parameters but doesn't compensate for other missing context.

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?

The schema description coverage is 100%, with all parameters well-documented in the schema itself. The description adds no additional parameter information beyond what's already in the structured data, so it meets the baseline for high schema coverage without compensating value.

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'), making the tool's purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'create_task' beyond the resource type, missing explicit distinction that would warrant a score of 5.

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. There's no mention of prerequisites, when not to use it, or how it relates to sibling tools like 'get_user' or 'get_users', leaving the agent without contextual usage instructions.

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/yvanfreitas/MCP-test'

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