Skip to main content
Glama

MinecraftWiki_getPageSummary

Retrieve a page summary and section list from the Minecraft Wiki to identify which specific section to access next for detailed information.

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 main handler function that fetches the main content (section 0) as a summary and lists all sections for the given Minecraft Wiki page title.
    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: [], }); } }
  • Defines the tool's schema including name, description, and input schema requiring a '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:138-144 (registration)
    Registers the tool in the MCP CallToolRequestHandler by matching the tool name and invoking the wikiService.getPageSummary handler.
    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 }] }; }
  • src/server.ts:52-52 (registration)
    Includes the tool in the list returned by ListToolsRequestHandler.
    GET_PAGE_SUMMARY_MINECRAFTWIKI_TOOL,
  • Type guard for validating input arguments to the tool, ensuring 'title' is a 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