Skip to main content
Glama

update_role

Modify an existing BookStack role by updating its display name, description, external authentication ID, or permission assignments to manage user access control.

Instructions

Update an existing role

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesRole ID
display_nameNoDisplay name for the role
descriptionNoRole description
external_auth_idNoExternal authentication ID
permissionsNoArray of permission names to assign to the role (replaces existing)

Implementation Reference

  • Executes the update_role tool: parses role ID from arguments, calls BookStackClient.updateRole, and returns formatted response.
    case "update_role": { const { id, ...updateData } = args; const roleId = parseInteger(id); const result = await client.updateRole(roleId, updateData); return formatApiResponse(result); }
  • Input schema defining parameters for updating a role: id (required), display_name, description, external_auth_id, permissions.
    inputSchema: { type: "object", properties: { id: { type: "number", description: "Role ID" }, display_name: { type: "string", description: "Display name for the role", }, description: { type: "string", description: "Role description" }, external_auth_id: { type: "string", description: "External authentication ID", }, permissions: { type: "array", description: "Array of permission names to assign to the role (replaces existing)", items: { type: "string" }, }, }, required: ["id"], },
  • Tool registration in createSearchAndUserTools: defines name, description, and inputSchema for update_role.
    { name: "update_role", description: "Update an existing role", inputSchema: { type: "object", properties: { id: { type: "number", description: "Role ID" }, display_name: { type: "string", description: "Display name for the role", }, description: { type: "string", description: "Role description" }, external_auth_id: { type: "string", description: "External authentication ID", }, permissions: { type: "array", description: "Array of permission names to assign to the role (replaces existing)", items: { type: "string" }, }, }, required: ["id"], }, },
  • src/index.ts:103-128 (registration)
    Registration and dispatch logic in main server: includes 'update_role' in searchUserToolNames and routes to handleSearchAndUserTool.
    const searchUserToolNames = [ "search_all", "list_users", "get_user", "create_user", "update_user", "delete_user", "list_roles", "get_role", "create_role", "update_role", "delete_role", "list_attachments", "get_attachment", "delete_attachment", "list_images", "get_image", "update_image", "delete_image", ]; if (contentToolNames.includes(name)) { result = await handleContentTool(name, args, bookStackClient); } else if (searchUserToolNames.includes(name)) { result = await handleSearchAndUserTool(name, args, bookStackClient); } else {
  • BookStackClient helper method that sends PUT request to /roles/{id} to update the role.
    async updateRole( id: number, data: Partial<CreateRoleRequest> ): Promise<Role> { return this.put<Role>(`/roles/${id}`, data); }

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/lautarobarba/bookstack_mcp_server'

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