delete_user
Remove a user account from the JSON database by specifying their unique ID. This tool helps maintain accurate user records by deleting outdated or unnecessary entries.
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:749-771 (handler)Handler function that deletes a user by ID from the in-memory database (db.users array), using findIndex and splice, then persists via writeDatabase. No authentication check.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' }) }] }; }
- src/index.js:290-300 (schema)Tool schema definition in the ListTools response, specifying input as object with required 'id' number field. No token required.{ 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'] } },