Skip to main content
Glama

role_update

Modify permissions and settings for existing roles in Crafty Controller to adjust user access and capabilities.

Instructions

Update an existing role in Crafty Controller

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
role_idYesRole ID to update
updatesYesRole fields to update

Implementation Reference

  • The handler logic for the role_update tool, which uses the CraftyClient to perform a PATCH request to update a role.
    server.tool(
      "role_update",
      "Update an existing role in Crafty Controller",
      {
        role_id: z.string().describe("Role ID to update"),
        updates: z.record(z.string(), z.unknown()).describe("Role fields to update"),
      },
      async ({ role_id, updates }) => {
        try {
          const data = await client.patch(`/roles/${role_id}`, updates);
          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