Skip to main content
Glama

MinecraftWiki_getPageSummary

Extract a summary and section list from a Minecraft Wiki page to identify relevant content for precise information retrieval in subsequent queries.

Instructions

Step 2 of the recommended workflow: After finding a page through search, use this to get both the page summary AND a list of all available sections. This helps determine which specific section to retrieve next using getPageSection.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesTitle of the Minecraft Wiki page

Implementation Reference

  • The core handler function `getPageSummary` that implements the tool logic: fetches section 0 as summary, gets page sections, formats and returns JSON with title, truncated summary, and sections list.
    async getPageSummary(title: string): Promise<string> { try { const section0 = await this.getPageSection(title, 0); const sections = await this.getSectionsInPage(title); // Parse the section0 content let section0Content = ""; try { const parsed = JSON.parse(section0); section0Content = parsed.content || ""; } catch { section0Content = section0; } return JSON.stringify({ title: formatMCPText(title), summary: formatMCPText(section0Content).substring(0, 200), sections: JSON.parse(sections).sections || [], }); } catch (error) { return JSON.stringify({ title: formatMCPText(title), error: error instanceof Error ? error.message : "Unknown error", summary: "", sections: [], }); } }
  • Tool schema definition: name, description, and inputSchema requiring 'title' string.
    export const GET_PAGE_SUMMARY_MINECRAFTWIKI_TOOL: Tool = { name: "MinecraftWiki_getPageSummary", description: "Step 2 of the recommended workflow: After finding a page through search, use this to get both the page summary AND a list of all available sections. This helps determine which specific section to retrieve next using getPageSection.", inputSchema: { type: "object", properties: { title: { type: "string", description: "Title of the Minecraft Wiki page", }, }, required: ["title"], }, };
  • src/server.ts:49-61 (registration)
    Registration in ListTools handler: includes GET_PAGE_SUMMARY_MINECRAFTWIKI_TOOL in the list of available tools.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ SEARCH_WIKI_MINECRAFTWIKI_TOOL, GET_PAGE_SUMMARY_MINECRAFTWIKI_TOOL, GET_SECTIONS_IN_PAGE_MINECRAFTWIKI_TOOL, GET_PAGE_SECTION_MINECRAFTWIKI_TOOL, GET_PAGE_CONTENT_MINECRAFTWIKI_TOOL, RESOLVE_REDIRECT_MINECRAFTWIKI_TOOL, LIST_CATEGORY_MEMBERS_MINECRAFTWIKI_TOOL, LIST_ALL_CATEGORIES_MINECRAFTWIKI_TOOL, GET_CATEGORIES_FOR_PAGE_MINECRAFTWIKI_TOOL, ], }));
  • src/server.ts:138-144 (registration)
    MCP CallTool switch case registration: validates args with type guard and delegates to wikiService.getPageSummary.
    case GET_PAGE_SUMMARY_MINECRAFTWIKI_TOOL.name: { if (!isGetPageSummaryArgs(args)) { throw new Error("Invalid arguments for getPageSummary"); } const results = await wikiService.getPageSummary(args.title); return { content: [{ type: "text", text: results }] }; }
  • Type guard helper for validating input arguments: ensures args has 'title' string.
    export function isGetPageSummaryArgs(args: unknown): args is { title: string } { return ( typeof args === "object" && args !== null && "title" in args && typeof (args as { title: string }).title === "string" ); }

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/L3-N0X/Minecraft-Wiki-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server