Skip to main content
Glama

delete_user

Remove a user from the MCP JSON Database Server by specifying their unique ID, enabling efficient user management and secure database operations.

Instructions

Kullanıcıyı siler

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesSilinecek kullanıcının ID'si

Implementation Reference

  • src/index.js:290-300 (registration)
    Registration of the 'delete_user' tool in the ListTools response, including its name, description, and input schema.
    { name: 'delete_user', description: 'Kullanıcıyı siler', inputSchema: { type: 'object', properties: { id: { type: 'number', description: 'Silinecek kullanıcının ID\'si' } }, required: ['id'] } },
  • The implementation of the delete_user tool handler. It locates the user by ID in the database, removes them if found, persists the change, and returns success or error message.
    case 'delete_user': { const { id } = args; const userIndex = db.users.findIndex(u => u.id === id); if (userIndex === -1) { return { content: [{ type: 'text', text: JSON.stringify({ error: 'Kullanıcı bulunamadı' }) }] }; } db.users.splice(userIndex, 1); await writeDatabase(db); return { content: [{ type: 'text', text: JSON.stringify({ success: true, message: 'Kullanıcı silindi' }) }] }; }

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