role_delete
Remove roles from Crafty Controller by specifying the role ID to manage user permissions and access control.
Instructions
Delete a role from Crafty Controller
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role_id | Yes | Role ID to delete |
Implementation Reference
- src/tools/roles.ts:71-84 (handler)The "role_delete" tool is registered and implemented as a handler within the registerRoleTools function in src/tools/roles.ts. It takes a role_id argument and performs a DELETE request via the CraftyClient.
server.tool( "role_delete", "Delete a role from Crafty Controller", { role_id: z.string().describe("Role ID to delete") }, async ({ role_id }) => { try { const data = await client.delete(`/roles/${role_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 }; } } );