list_images
Retrieve a paginated listing of gallery images from BookStack, with options to filter by type (gallery or drawio) and sort results.
Instructions
Get a listing of images in the gallery
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | Number of items per page | |
| filter_type | No | Filter images by type | |
| page | No | Page number for pagination | |
| sort | No | Sort parameter |
Implementation Reference
- src/tools/search-user-tools.ts:492-503 (handler)The execution handler for the 'list_images' tool. Parses input arguments for pagination and filter_type, calls the BookStack client's getImageGallery method, and returns a formatted API response.case "list_images": { const { filter_type, ...paginationArgs } = args; const params = PaginationSchema.parse(paginationArgs); const allParams = { ...params, filter_type, }; const result = await client.getImageGallery(params); return formatApiResponse(result.data, result.total); }
- The input schema definition for the 'list_images' tool, specifying parameters for pagination, sorting, and image type filtering.{ name: "list_images", description: "Get a listing of images in the gallery", 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" }, filter_type: { type: "string", enum: ["gallery", "drawio"], description: "Filter images by type", }, }, }, },
- src/index.ts:56-59 (registration)Registration of the 'list_images' tool via inclusion in createSearchAndUserTools, which is spread into the allTools list returned by listTools.const allTools: Tool[] = [ ...createContentTools(bookStackClient), ...createSearchAndUserTools(bookStackClient), ];
- src/index.ts:124-128 (registration)Dispatch registration routing 'list_images' calls (as part of searchUserToolNames) to the handleSearchAndUserTool function.if (contentToolNames.includes(name)) { result = await handleContentTool(name, args, bookStackClient); } else if (searchUserToolNames.includes(name)) { result = await handleSearchAndUserTool(name, args, bookStackClient); } else {