Skip to main content
Glama

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
NameRequiredDescriptionDefault
role_idYesRole ID to delete

Implementation Reference

  • 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 };
        }
      }
    );

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/HadiCherkaoui/crafty-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server