Skip to main content
Glama

get_user

Retrieve user details from a BookStack wiki by providing a user ID. This tool enables user administration and access management within the platform.

Instructions

Get details of a specific user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesUser ID

Implementation Reference

  • The execution handler for the 'get_user' tool. Parses the input 'id' to integer, calls BookStackClient.getUser(id), and formats the response using formatApiResponse.
    case "get_user": { const id = parseInteger(args.id); const result = await client.getUser(id); return formatApiResponse(result); }
  • The Tool object definition for 'get_user', including name, description, and inputSchema that requires a numeric 'id'.
    { name: "get_user", description: "Get details of a specific user", inputSchema: { type: "object", properties: { id: { type: "number", description: "User ID" }, }, required: ["id"], }, },
  • src/index.ts:56-66 (registration)
    Registers the tool schemas by including createSearchAndUserTools() (which defines 'get_user') in the allTools array, returned by the MCP listTools handler.
    const allTools: Tool[] = [ ...createContentTools(bookStackClient), ...createSearchAndUserTools(bookStackClient), ]; // List tools handler server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: allTools, }; });
  • src/index.ts:103-128 (registration)
    Routes execution of 'get_user' tool calls: listed in searchUserToolNames array and dispatched to handleSearchAndUserTool via the MCP callTool handler.
    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.getUser(id) method: performs API GET request to /users/{id} and returns the User object.
    async getUser(id: number): Promise<User> { const response: AxiosResponse<User> = await this.api.get(`/users/${id}`); return response.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