list_pages
Retrieve a paginated listing of wiki pages accessible to the user, with options to sort results and control page size for efficient content browsing.
Instructions
Get a listing of pages visible to the user
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/content-tools.ts:671-675 (handler)Handler logic for the 'list_pages' tool: parses input arguments using PaginationSchema, calls BookStackClient.getPages with pagination params, and formats the paginated response using formatApiResponse.case "list_pages": { const params = PaginationSchema.parse(args); const result = await client.getPages(params); return formatApiResponse(result.data, result.total); }
- src/tools/content-tools.ts:295-306 (schema)Tool definition including name, description, and input schema for 'list_pages', specifying optional pagination parameters (page, count, sort).{ name: "list_pages", description: "Get a listing of pages visible to the user", 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:124-126 (registration)Registers 'list_pages' for execution by checking if the tool name is in contentToolNames (which includes 'list_pages') and dispatching to handleContentTool.if (contentToolNames.includes(name)) { result = await handleContentTool(name, args, bookStackClient); } else if (searchUserToolNames.includes(name)) {
- src/index.ts:56-59 (registration)Registers the 'list_pages' tool schema by including createContentTools output in the allTools array returned by the MCP listTools handler.const allTools: Tool[] = [ ...createContentTools(bookStackClient), ...createSearchAndUserTools(bookStackClient), ];