user_delete
Permanently delete user accounts from Crafty Controller. Requires superuser privileges to remove users by ID.
Instructions
Permanently delete a Crafty Controller user account. Requires superuser privileges.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"user_id": "<user_id>"
},
"name": "user_delete"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_id | Yes | User ID to delete |
Implementation Reference
- src/tools/users.ts:86-99 (handler)The registration and handler implementation for the `user_delete` tool.
server.tool( "user_delete", "Permanently delete a Crafty Controller user account. Requires superuser privileges.", { user_id: z.string().describe("User ID to delete") }, async ({ user_id }) => { try { const data = await client.delete(`/users/${user_id}`); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } catch (error) { const msg = error instanceof Error ? error.message : String(error); return { content: [{ type: "text", text: `Error: ${msg}` }], isError: true }; } } );