Skip to main content
Glama
huseyindol

User Info MCP Server

by huseyindol

add_user

Add new users to the system by entering their full name, email, and phone number. Ideal for managing user data efficiently on the User Info MCP Server.

Instructions

Yeni kullanıcı ekle

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailYesE-posta adresi
nameYesKullanıcının tam adı
phoneYesTelefon numarası

Implementation Reference

  • The main handler function that executes the add_user tool logic: destructures input params, calls userService.createUser, formats success/error into MCP ToolResponse.
    static async handleAddUser({ name, email, phone }: { name: string; email: string; phone: string }): Promise<ToolResponse> { try { const result = await userService.createUser({ name, email, phone }); return { content: [ { type: "text", text: result.success ? `${result.message}\n${JSON.stringify(result.data, null, 2)}` : result.error || "Kullanıcı oluşturulamadı", }, ], }; } catch (error) { return { content: [ { type: "text", text: "Kullanıcı oluşturma işleminde hata oluştu", }, ], }; } }
  • Zod input schema defining and validating the required parameters: name (string, min2 max100), email (valid email), phone (string min10 max20).
    export const AddUserInputSchema = { name: z.string().min(2).max(100).describe("Kullanıcının tam adı"), email: z.string().email().describe("E-posta adresi"), phone: z.string().min(10).max(20).describe("Telefon numarası") };
  • Registers the 'add_user' tool on the MCP server with name, title, description, input schema reference, and handler function reference.
    server.registerTool( "add_user", { title: "Kullanıcı Ekle", description: "Yeni kullanıcı ekle", inputSchema: AddUserInputSchema, }, UserController.handleAddUser );

Other Tools

Related 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/huseyindol/McpProjectScaffold'

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