list_users
Retrieve a paginated list of system users with configurable sorting options to manage user administration in BookStack wiki instances.
Instructions
Get a listing of users in the system
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number for pagination | |
| count | No | Number of items per page | |
| sort | No | Sort parameter |
Implementation Reference
- src/tools/search-user-tools.ts:357-361 (handler)Handler logic for the 'list_users' tool. Parses input arguments using PaginationSchema, calls BookStackClient.getUsers with pagination params, and formats the paginated response.case "list_users": { const params = PaginationSchema.parse(args); const result = await client.getUsers(params); return formatApiResponse(result.data, result.total); }
- src/tools/search-user-tools.ts:38-49 (schema)Tool definition including name, description, and input schema for 'list_users', defining optional pagination and sort parameters.{ name: "list_users", description: "Get a listing of users in the system", inputSchema: { type: "object", properties: { page: { type: "number", description: "Page number for pagination" }, count: { type: "number", description: "Number of items per page" }, sort: { type: "string", description: "Sort parameter" }, }, }, },
- src/index.ts:103-128 (registration)Registration of 'list_users' in the searchUserToolNames array, used to dispatch tool calls to the appropriate handler function 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 {
- src/index.ts:56-59 (registration)'list_users' tool is included via spread of createSearchAndUserTools into allTools, which is returned in the MCP listTools response.const allTools: Tool[] = [ ...createContentTools(bookStackClient), ...createSearchAndUserTools(bookStackClient), ];