Skip to main content
Glama
yusuferenkt

MCP JSON Database Server

by yusuferenkt

register

Create new user accounts in the JSON Database Server by providing name, email, password, department, position, and role details for system access.

Instructions

Yeni kullanıcı kaydı oluşturur

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesKullanıcı adı
emailYesE-posta adresi
passwordYesŞifre
departmentYesDepartman
positionYesPozisyon
roleNoKullanıcı rolü

Implementation Reference

  • The core handler for the 'register' tool. Validates email uniqueness, hashes the password using hashPassword from auth.js, generates a new user ID, adds the user to the database, persists changes, and returns a success response with user details.
    case 'register': {
      const { name: userName, email, password, department, position, role = 'employee' } = args;
      
      // E-posta kontrolü
      const existingUser = db.users.find(u => u.email === email);
      if (existingUser) {
        return {
          content: [{
            type: 'text',
            text: JSON.stringify({ success: false, message: 'Bu e-posta adresi zaten kayıtlı' })
          }]
        };
      }
    
      // Şifreyi hash'le
      const hashedPassword = await hashPassword(password);
      
      // Yeni kullanıcı oluştur
      const newUser = {
        id: generateId(db.users),
        name: userName,
        email,
        password: hashedPassword,
        department,
        position,
        role,
        joinDate: new Date().toISOString().split('T')[0]
      };
    
      db.users.push(newUser);
      await writeDatabase(db);
    
      return {
        content: [{
          type: 'text',
          text: JSON.stringify({ 
            success: true, 
            message: 'Kullanıcı başarıyla kaydedildi',
            user: { id: newUser.id, name: userName, email, role }
          })
        }]
      };
    }
  • src/index.js:65-82 (registration)
    The 'register' tool registration in the ListToolsRequestSchema response, including name, description, and input schema definition.
    name: 'register',
    description: 'Yeni kullanıcı kaydı oluşturur',
    inputSchema: {
      type: 'object',
      properties: {
        name: { type: 'string', description: 'Kullanıcı adı' },
        email: { type: 'string', description: 'E-posta adresi' },
        password: { type: 'string', description: 'Şifre' },
        department: { type: 'string', description: 'Departman' },
        position: { type: 'string', description: 'Pozisyon' },
        role: { 
          type: 'string', 
          enum: ['admin', 'manager', 'employee'], 
          description: 'Kullanıcı rolü' 
        }
      },
      required: ['name', 'email', 'password', 'department', 'position']
    }
  • Input schema definition for the 'register' tool, specifying required fields and types for user registration.
    inputSchema: {
      type: 'object',
      properties: {
        name: { type: 'string', description: 'Kullanıcı adı' },
        email: { type: 'string', description: 'E-posta adresi' },
        password: { type: 'string', description: 'Şifre' },
        department: { type: 'string', description: 'Departman' },
        position: { type: 'string', description: 'Pozisyon' },
        role: { 
          type: 'string', 
          enum: ['admin', 'manager', 'employee'], 
          description: 'Kullanıcı rolü' 
        }
      },
      required: ['name', 'email', 'password', 'department', 'position']
    }
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 it creates a new user registration but doesn't mention authentication requirements, whether it's idempotent, what happens on duplicate emails, or what the response looks like. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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 in Turkish that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, with zero wasted content.

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 registration tool with 6 parameters (5 required) and no annotations or output schema, the description is inadequate. It doesn't explain the registration process, success/failure responses, or how it differs from similar tools like 'add_user'. The agent lacks context about what 'registration' entails beyond basic parameter passing.

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%, with all parameters well-documented in Turkish. The description doesn't add any parameter-specific information beyond what's in the schema, such as format constraints or examples. With high schema coverage, the baseline score of 3 is appropriate as the 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 'Yeni kullanıcı kaydı oluşturur' (Creates new user registration) clearly states the verb ('oluşturur' - creates) and resource ('kullanıcı kaydı' - user registration). It distinguishes from siblings like 'add_user' by specifying 'new registration' context, though not explicitly contrasting with 'add_user' which might serve a similar purpose.

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 like 'add_user' or 'login'. There's no mention of prerequisites, context (e.g., for new users vs. existing users), or exclusions, leaving the agent to infer usage from the tool name 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/yusuferenkt/mcp-database'

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