Skip to main content
Glama

update_user

Modify user account details in BookStack, including name, email, password, roles, language, and authentication settings.

Instructions

Update an existing user account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesUser ID
nameNoFull name of the user
emailNoEmail address (must be unique)
passwordNoNew password (min 8 characters)
rolesNoArray of role IDs to assign to the user (replaces existing)
languageNoUser interface language code
external_auth_idNoExternal authentication ID

Implementation Reference

  • Executes the update_user tool by extracting user ID and update data from arguments, parsing the ID, calling the BookStackClient's updateUser method, and formatting the API response.
    case "update_user": { const { id, migrate_ownership_id, ...updateData } = args; const userId = parseInteger(id); const result = await client.updateUser(userId, updateData); return formatApiResponse(result); }
  • Defines the MCP tool 'update_user' including its name, description, and input schema specifying parameters like id (required), name, email, password, roles, language, and external_auth_id.
    { name: "update_user", description: "Update an existing user account", inputSchema: { type: "object", properties: { id: { type: "number", description: "User ID" }, name: { type: "string", description: "Full name of the user" }, email: { type: "string", description: "Email address (must be unique)", }, password: { type: "string", description: "New password (min 8 characters)", }, roles: { type: "array", description: "Array of role IDs to assign to the user (replaces existing)", items: { type: "number" }, }, language: { type: "string", description: "User interface language code", }, external_auth_id: { type: "string", description: "External authentication ID", }, }, required: ["id"], }, },
  • BookStackClient method that performs the actual API PUT request to update a user at /users/{id} with the provided partial user data.
    async updateUser( id: number, data: Partial<CreateUserRequest> ): Promise<User> { return this.put<User>(`/users/${id}`, data); }
  • src/index.ts:102-128 (registration)
    Registers 'update_user' in the searchUserToolNames array used to dispatch tool calls to the appropriate handler (handleSearchAndUserTool). The tools are also included via createSearchAndUserTools in the allTools list for listTools endpoint.
    // Search and user tools 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 {
  • Zod schema for validating partial updates to user data, used in type definitions for CreateUserRequest.
    export const UpdateUserSchema = CreateUserSchema.partial();

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