Skip to main content
Glama
Myk3rinos

MCP Personal Tools Server

by Myk3rinos

create-user

Add new user records to the database with required personal details including name, email, address, phone, and password.

Instructions

Create a new user in the database

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
emailYes
addressYes
phoneYes
passwordYes

Implementation Reference

  • src/server.ts:64-87 (registration)
    Registration of the 'create-user' tool, including input schema, hints, and inline handler function.
    server.tool("create-user","Create a new user in the database", {
        name: z.string(),
        email: z.string().email(),
        address: z.string(),
        phone: z.string(),
        password: z.string(),
    }, {
        title: "Create User",
        readOnlyHint: false,
        destructiveHint: false,
        idempotentHint: false,
        openWorldHint: true,
    }, async (params) => {
        try {
            const id = await createUser(params);
            return {
                content: [{ type: "text", text: `User ${params.name} with id ${id} created successfully` }]
            }    
        } catch (error) {
            return {
                content: [{ type: "text", text: `User ${params.name} creation failed` }]
            }    
        }  
    })
  • Core handler logic for creating a user: loads users from JSON, appends new user, writes back to file, returns new ID.
    async function createUser(user: {name: string, email: string, address: string, phone: string, password: string }) {
        const users = await import("./data/users.json", {
            with: {type: "json" },
        }).then((module) => module.default);
        const id = users.length + 1;
        users.push({ id, ...user });
        await fs.writeFile("./src/data/users.json", JSON.stringify(users, null, 2));
        
        return id;
    }
  • Input schema for the create-user tool, validated with Zod.
        name: z.string(),
        email: z.string().email(),
        address: z.string(),
        phone: z.string(),
        password: z.string(),
    }, {
  • Inline handler function passed to server.tool for create-user, handles error and success responses.
    }, async (params) => {
        try {
            const id = await createUser(params);
            return {
                content: [{ type: "text", text: `User ${params.name} with id ${id} created successfully` }]
            }    
        } catch (error) {
            return {
                content: [{ type: "text", text: `User ${params.name} creation failed` }]
            }    
        }  
    })
Behavior3/5

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

Annotations provide key behavioral hints: readOnlyHint=false (write operation), openWorldHint=true (can create new entities), idempotentHint=false (not repeatable), destructiveHint=false (safe). The description adds no additional behavioral context beyond confirming it's a creation operation, which aligns with annotations but doesn't elaborate on permissions, side effects, or error handling.

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, direct sentence with no wasted words. It is appropriately sized and front-loaded, efficiently conveying the core purpose without unnecessary elaboration.

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 write operation with 5 required parameters, 0% schema coverage, and no output schema, the description is inadequate. It lacks parameter explanations, usage context, and behavioral details beyond basic creation, failing to provide the completeness needed for effective tool invocation.

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 parameters are undocumented in the schema. The description provides no information about what the parameters mean, their constraints, or how they interact. It fails to compensate for the lack of schema documentation, leaving semantics unclear.

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 verb ('Create') and resource ('new user in the database'), making the purpose immediately understandable. However, it does not differentiate from the sibling tool 'add-note', which appears unrelated but could potentially overlap in some contexts without explicit distinction.

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, prerequisites, or exclusions. It simply states what the tool does without context for selection, leaving the agent to infer usage based on 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/Myk3rinos/MCP'

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