Skip to main content
Glama

get_attachment

Retrieve details for a specific attachment in BookStack by providing its ID, enabling access to file information within the wiki system.

Instructions

Get details of a specific attachment

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesAttachment ID

Implementation Reference

  • Tool registration object for 'get_attachment', including name, description, and input schema that requires a numeric 'id' parameter.
    { name: "get_attachment", description: "Get details of a specific attachment", inputSchema: { type: "object", properties: { id: { type: "number", description: "Attachment ID" }, }, required: ["id"], }, },
  • Input schema for the get_attachment tool, defining an object with a required numeric 'id' property.
    inputSchema: { type: "object", properties: { id: { type: "number", description: "Attachment ID" }, }, required: ["id"], },
  • Handler implementation for the get_attachment tool within the tool dispatcher. Parses the 'id' argument, calls BookStackClient.getAttachment(id), and returns a formatted response.
    case "get_attachment": { const id = parseInteger(args.id); const result = await client.getAttachment(id); return formatApiResponse(result); }
  • BookStackClient helper method that performs the actual API call to retrieve attachment details by ID from the BookStack server.
    async getAttachment(id: number): Promise<Attachment> { const response: AxiosResponse<Attachment> = await this.api.get( `/attachments/${id}` ); return response.data; }
  • src/index.ts:56-66 (registration)
    Top-level registration where search-user-tools (containing get_attachment) are combined into allTools and provided to the MCP server's listTools handler.
    const allTools: Tool[] = [ ...createContentTools(bookStackClient), ...createSearchAndUserTools(bookStackClient), ]; // List tools handler server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: allTools, }; });

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