Skip to main content
Glama

get_image

Retrieve specific image details from BookStack wiki by providing its ID for content management and reference.

Instructions

Get details of a specific image

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesImage ID

Implementation Reference

  • Handler logic for the 'get_image' MCP tool. Parses the input 'id', calls the BookStack client's getImage method, and returns a formatted API response.
    case "get_image": { const id = parseInteger(args.id); const result = await client.getImage(id); return formatApiResponse(result); }
  • Tool definition including name, description, and input schema (requires 'id' as number) for the 'get_image' tool, returned by createSearchAndUserTools.
    { name: "get_image", description: "Get details of a specific image", inputSchema: { type: "object", properties: { id: { type: "number", description: "Image ID" }, }, required: ["id"], }, },
  • Core implementation in BookStackClient that makes the HTTP GET request to /api/image-gallery/{id} to fetch image details.
    async getImage(id: number): Promise<ImageGallery> { const response: AxiosResponse<ImageGallery> = await this.api.get( `/image-gallery/${id}` ); return response.data; }
  • src/index.ts:103-122 (registration)
    Registration of 'get_image' in the searchUserToolNames array, which determines dispatch to handleSearchAndUserTool in the MCP server's CallToolRequest 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/index.ts:56-59 (registration)
    Includes tools from createSearchAndUserTools (containing 'get_image' definition) into the allTools list returned by ListToolsRequest to the MCP server.
    const allTools: Tool[] = [ ...createContentTools(bookStackClient), ...createSearchAndUserTools(bookStackClient), ];

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