get_image
Retrieve specific image details from BookStack wiki using the image ID to access visual content information.
Instructions
Get details of a specific image
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Image ID |
Implementation Reference
- src/tools/search-user-tools.ts:505-509 (handler)Handler logic for the 'get_image' tool: parses the input ID, calls the BookStack client's getImage method, and formats the API response.case "get_image": { const id = parseInteger(args.id); const result = await client.getImage(id); return formatApiResponse(result); }
- Input schema definition for the 'get_image' tool, requiring a numeric 'id' parameter.{ name: "get_image", description: "Get details of a specific image", inputSchema: { type: "object", properties: { id: { type: "number", description: "Image ID" }, }, required: ["id"], }, },
- src/index.ts:103-122 (registration)Registration of 'get_image' as part of the search and user tools dispatch list in the main MCP server 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", ];
- src/lib/bookstack-client.ts:371-376 (helper)Helper method in BookStackClient that performs the actual API GET request to retrieve image details by ID from the '/image-gallery/{id}' endpoint.async getImage(id: number): Promise<ImageGallery> { const response: AxiosResponse<ImageGallery> = await this.api.get( `/image-gallery/${id}` ); return response.data; }