Skip to main content
Glama

get_attachment

Retrieve details of a specific attachment from BookStack wiki using its unique attachment ID to access file information and metadata.

Instructions

Get details of a specific attachment

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesAttachment ID

Implementation Reference

  • Handler logic for the 'get_attachment' tool: parses the attachment ID from arguments, calls the BookStack client's getAttachment method, and formats the response.
    case "get_attachment": { const id = parseInteger(args.id); const result = await client.getAttachment(id); return formatApiResponse(result); }
  • Tool schema definition for 'get_attachment', specifying input as an object with required 'id' property of type number.
    { name: "get_attachment", description: "Get details of a specific attachment", inputSchema: { type: "object", properties: { id: { type: "number", description: "Attachment ID" }, }, required: ["id"], }, },
  • src/index.ts:57-59 (registration)
    Registration of tools by including the output of createSearchAndUserTools (which defines 'get_attachment') in the allTools array used for MCP server tool listing.
    ...createContentTools(bookStackClient), ...createSearchAndUserTools(bookStackClient), ];
  • BookStackClient helper method that performs the actual API call to retrieve attachment details by ID.
    async getAttachment(id: number): Promise<Attachment> { const response: AxiosResponse<Attachment> = await this.api.get( `/attachments/${id}` ); return response.data; }
  • src/index.ts:116-122 (registration)
    Explicit listing of 'get_attachment' in the searchUserToolNames array for tool dispatch routing to the correct handler.
    "get_attachment", "delete_attachment", "list_images", "get_image", "update_image", "delete_image", ];

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