Skip to main content
Glama

MinecraftWiki_searchWiki

Search the Minecraft Wiki for specific structures, entities, items, or blocks to find information quickly. Use basic search terms for best results, then access detailed content through related tools.

Instructions

Search the Minecraft Wiki for a specific structure, entity, item or block. NOTE: Only use for basic search terms like item/block/structure/entity names - complex queries (like 'loot table of X' or 'how to craft Y') will not work. For best results: 1. Search for the basic entity/structure/etc name first, 2. Then use getPageSummary to see available sections, 3. Finally use getPageSection to get specific section content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch term to find on the Minecraft Wiki.

Implementation Reference

  • Core implementation of the MinecraftWiki_searchWiki tool: performs MediaWiki API search query and returns formatted JSON results.
    async searchWiki(query: string): Promise<string> { const response = await apiService.get<WikiResponse, Record<string, unknown>>("", { action: "query", list: "search", srsearch: query, }); const results = response.query?.search; if (!results?.length) { return JSON.stringify({ results: [] }); } // Return JSON-formatted results return createJsonSearchResult(results); }
  • Static schema definition for the tool, including name, description, and input validation schema.
    export const SEARCH_WIKI_MINECRAFTWIKI_TOOL: Tool = { name: "MinecraftWiki_searchWiki", description: "Search the Minecraft Wiki for a specific structure, entity, item or block. NOTE: Only use for basic search terms like item/block/structure/entity names - complex queries (like 'loot table of X' or 'how to craft Y') will not work. For best results: 1. Search for the basic entity/structure/etc name first, 2. Then use getPageSummary to see available sections, 3. Finally use getPageSection to get specific section content.", inputSchema: { type: "object", properties: { query: { type: "string", description: "Search term to find on the Minecraft Wiki.", }, }, required: ["query"], }, };
  • src/server.ts:74-80 (registration)
    MCP server registration: handles CallToolRequest for this tool by validating args with guard and delegating to wikiService.searchWiki.
    case SEARCH_WIKI_MINECRAFTWIKI_TOOL.name: { if (!isSearchWikiArgs(args)) { throw new Error("Invalid arguments for searchWiki"); } const results = await wikiService.searchWiki(args.query); return { content: [{ type: "text", text: results }] }; }
  • src/server.ts:51-51 (registration)
    Tool is included in the list returned by ListToolsRequest for discovery.
    SEARCH_WIKI_MINECRAFTWIKI_TOOL,
  • Utility function used by the handler to format search results into JSON compatible with MCP.
    export function createJsonSearchResult(results: Array<{ title: string; snippet: string }>): string { if (!results || !results.length) return JSON.stringify({ results: [] }); const formattedResults = results.map((item, index) => ({ resultId: index + 1, title: formatMCPText(item.title), snippet: formatMCPText(item.snippet || "").substring(0, 100), })); return JSON.stringify({ results: formattedResults }); }

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