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
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Silinecek 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'] } },
- src/index.js:749-771 (handler)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' }) }] }; }