Skip to main content
Glama

update_user

Modify an existing BookStack user account by updating details such as name, email, password, roles, language, or external authentication ID.

Instructions

Update an existing user account

Input Schema

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

Implementation Reference

  • The handler logic for the 'update_user' tool within the handleSearchAndUserTool function. It extracts the user ID and update data from arguments, calls the BookStackClient.updateUser method, and returns a formatted 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); }
  • The tool registration definition for 'update_user', including name, description, and input schema, returned by createSearchAndUserTools and registered in the MCP server.
    { 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"], }, },
  • The BookStackClient helper method that wraps the Axios PUT request to the BookStack API endpoint `/users/{id}` for updating user information.
    async updateUser( id: number, data: Partial<CreateUserRequest> ): Promise<User> { return this.put<User>(`/users/${id}`, data); }
  • Zod schema definition for validating update_user input data, based on partial CreateUserSchema (though not directly used in the tool handler).
    export const UpdateUserSchema = CreateUserSchema.partial();
  • src/index.ts:104-122 (registration)
    The 'update_user' tool is listed in the searchUserToolNames array used to dispatch calls to the appropriate handler in the MCP server's CallToolRequest handler.
    "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", ];

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