Skip to main content
Glama

get_page

Retrieve content and details for a specific page using its ID to access information from a BookStack wiki instance.

Instructions

Get details and content of a specific page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesPage ID

Implementation Reference

  • The handler function for the 'get_page' tool. It parses the page ID from arguments, calls the BookStack client's getPage method, and formats the API response.
    case "get_page": {
      const id = parseInteger(args.id);
      const result = await client.getPage(id);
      return formatApiResponse(result);
    }
  • The tool definition including name, description, and input schema for validating the 'id' parameter as a required number.
    {
      name: "get_page",
      description: "Get details and content of a specific page",
      inputSchema: {
        type: "object",
        properties: {
          id: { type: "number", description: "Page ID" },
        },
        required: ["id"],
      },
    },
  • src/index.ts:56-59 (registration)
    Registration of tools by combining content tools (which includes 'get_page') into the allTools array provided to the MCP server.
    const allTools: Tool[] = [
      ...createContentTools(bookStackClient),
      ...createSearchAndUserTools(bookStackClient),
    ];
  • src/index.ts:124-126 (registration)
    Dispatch registration: routes calls to 'get_page' (listed in contentToolNames) to the handleContentTool function.
    if (contentToolNames.includes(name)) {
      result = await handleContentTool(name, args, bookStackClient);
    } else if (searchUserToolNames.includes(name)) {
  • Helper method in BookStackClient that performs the actual API GET request to retrieve a page by ID.
    async getPage(id: number): Promise<Page> {
      const response: AxiosResponse<Page> = await this.api.get(`/pages/${id}`);
      return response.data;
    }

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