Skip to main content
Glama
Mming-Lab
by Mming-Lab

minecraft_wiki

Search and retrieve detailed information from the official Minecraft Wiki for Bedrock and Education Editions. Focus on commands, blocks, items, entities, and mechanics using a step-by-step sequence for efficient information gathering.

Instructions

Search Minecraft Wiki for Bedrock Edition and Education Edition commands, blocks, items, entities, and game mechanics. Excludes Java Edition-only features. Returns accurate, up-to-date information from the official Minecraft Wiki. Use sequence action for step-by-step information gathering: 1) search for topic, 2) get specific page, 3) get detailed section - reduces overwhelming responses.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesWiki search action to perform
focusNoFocus area for search results
page_titleNoSpecific wiki page title to retrieve
queryNoSearch query (e.g., "give command", "diamond sword", "teleport", "setblock")
sectionNoSpecific section name within a page
stepsNoArray of wiki search actions for sequence. Example: [{"type":"search","query":"give command","focus":"commands"},{"type":"get_page","title":"Commands/give"},{"type":"get_section","title":"Commands/give","section":"Syntax"}]. Use this to break down information gathering into manageable steps instead of getting overwhelming responses.
titleNoWiki page title (alternative parameter name for compatibility)

Implementation Reference

  • The primary handler method that processes input arguments, dispatches to specific wiki operations based on the 'action' parameter (search, get_page, get_section, sequence), calls helper methods, and returns structured ToolCallResult.
    async execute(args: {
        action: string;
        query?: string;
        page_title?: string;
        title?: string;
        section?: string;
        focus?: string;
        steps?: SequenceStep[];
    }): Promise<ToolCallResult> {
        try {
            const { action } = args;
            let result: any;
            let message: string;
    
            switch (action) {
                case 'search':
                    if (!args.query) {
                        return { success: false, message: 'Query required for search action' };
                    }
                    result = await this.searchWiki(args.query, args.focus);
                    message = `Wiki search completed for: "${args.query}"`;
                    break;
    
                case 'get_page':
                    const pageTitle = args.page_title || args.title;
                    if (!pageTitle) {
                        return { success: false, message: 'Page title required for get_page action' };
                    }
                    result = await this.getPageContent(pageTitle);
                    message = `Retrieved wiki page: "${pageTitle}"`;
                    break;
    
                case 'get_page_summary':
                    const summaryTitle = args.page_title || args.title;
                    if (!summaryTitle) {
                        return { success: false, message: 'Page title required for get_page_summary action' };
                    }
                    result = await this.getPageSummary(summaryTitle);
                    message = `Retrieved wiki page summary: "${summaryTitle}"`;
                    break;
    
                case 'get_section':
                    const sectionPageTitle = args.page_title || args.title;
                    if (!sectionPageTitle || !args.section) {
                        return { success: false, message: 'Page title and section required for get_section action' };
                    }
                    result = await this.getPageSection(sectionPageTitle, args.section);
                    message = `Retrieved section "${args.section}" from page "${sectionPageTitle}"`;
                    break;
    
                case 'sequence':
                    if (!args.steps) {
                        return this.createErrorResponse('steps array is required for sequence action');
                    }
                    return await this.executeSequence(args.steps as SequenceStep[]);
    
                default:
                    return { 
                        success: false, 
                        message: `Unknown action: ${action}. Supported actions: search, get_page, get_page_summary, get_section, sequence` 
                    };
            }
    
            return {
                success: true,
                message: message,
                data: { action, result, timestamp: Date.now() }
            };
    
        } catch (error) {
            return {
                success: false,
                message: `Minecraft Wiki search error: ${error instanceof Error ? error.message : String(error)}`
            };
        }
    }
  • Defines the input schema with required 'action' and optional parameters for querying the Minecraft Wiki, including support for sequence steps.
    readonly inputSchema: InputSchema = {
        type: 'object',
        properties: {
            action: {
                type: 'string',
                description: 'Wiki search action to perform',
                enum: ['search', 'get_page', 'get_page_summary', 'get_section', 'sequence']
            },
            query: {
                type: 'string',
                description: 'Search query (e.g., "give command", "diamond sword", "teleport", "setblock")'
            },
            page_title: {
                type: 'string',
                description: 'Specific wiki page title to retrieve'
            },
            title: {
                type: 'string',
                description: 'Wiki page title (alternative parameter name for compatibility)'
            },
            section: {
                type: 'string',
                description: 'Specific section name within a page'
            },
            focus: {
                type: 'string',
                description: 'Focus area for search results',
                enum: ['commands', 'blocks', 'items', 'entities', 'mechanics', 'bedrock_edition', 'education_edition']
            },
            steps: {
                type: 'array',
                description: 'Array of wiki search actions for sequence. Example: [{"type":"search","query":"give command","focus":"commands"},{"type":"get_page","title":"Commands/give"},{"type":"get_section","title":"Commands/give","section":"Syntax"}]. Use this to break down information gathering into manageable steps instead of getting overwhelming responses.',
                items: {
                    type: 'object',
                    description: 'Wiki sequence step',
                    properties: {
                        type: {
                            type: 'string',
                            enum: ['search', 'get_page', 'get_page_summary', 'get_section', 'wait'],
                            description: 'Wiki action type'
                        },
                        query: { type: 'string', description: 'Search query for search action' },
                        title: { type: 'string', description: 'Page title for get_page/get_section actions' },
                        page_title: { type: 'string', description: 'Alternative page title parameter' },
                        section: { type: 'string', description: 'Section name for get_section action' },
                        focus: { 
                            type: 'string', 
                            enum: ['commands', 'blocks', 'items', 'entities', 'mechanics', 'bedrock_edition', 'education_edition'],
                            description: 'Search focus area' 
                        },
                        wait_time: { type: 'number', description: 'Wait time in seconds after this step' }
                    },
                    required: ['type']
                }
            }
        },
        required: ['action']
    };
  • src/server.ts:357-357 (registration)
    Instantiation of the MinecraftWikiTool class and addition to the central tools array during server initialization.
    new MinecraftWikiTool(),
  • src/server.ts:494-573 (registration)
    Loop that registers all modular tools (including minecraft_wiki) to the MCP server by converting inputSchema to Zod schema and providing a wrapper around the tool's execute method.
    this.tools.forEach((tool) => {
      // inputSchemaをZod形式に変換(SchemaToZodConverterを使用)
      const zodSchema = schemaConverter.convert(tool.inputSchema);
    
      // ツールを登録
      this.mcpServer.registerTool(
        tool.name,
        {
          title: tool.name,
          description: tool.description,
          inputSchema: zodSchema,
        },
        async (args: any) => {
          try {
            const result = await tool.execute(args);
    
            let responseText: string;
    
            if (result.success) {
              // 建築ツールの場合は最適化
              if (tool.name.startsWith('build_')) {
                const optimized = optimizeBuildResult(result);
                responseText = `✅ ${optimized.message}`;
                if (optimized.summary) {
                  responseText += `\n\n📊 Summary:\n${JSON.stringify(optimized.summary, null, 2)}`;
                }
              } else {
                // 通常ツールの場合
                responseText = result.message || `Tool ${tool.name} executed successfully`;
                if (result.data) {
                  // データサイズチェック
                  const dataStr = JSON.stringify(result.data, null, 2);
                  const sizeWarning = checkResponseSize(dataStr);
    
                  if (sizeWarning) {
                    // 大きすぎる場合はデータタイプのみ表示
                    responseText += `\n\n${sizeWarning}`;
                    responseText += `\nData type: ${Array.isArray(result.data) ? `Array[${result.data.length}]` : typeof result.data}`;
                  } else {
                    responseText += `\n\nData: ${dataStr}`;
                  }
                }
              }
            } else {
              // エラーメッセージにヒントを追加
              const errorMsg = result.message || "Tool execution failed";
              const enrichedError = enrichErrorWithHints(errorMsg);
              responseText = `❌ ${enrichedError}`;
              if (result.data) {
                responseText += `\n\nDetails:\n${JSON.stringify(result.data, null, 2)}`;
              }
            }
    
            return {
              content: [
                {
                  type: "text",
                  text: responseText,
                },
              ],
            };
          } catch (error) {
            const errorMsg =
              error instanceof Error ? error.message : String(error);
            const errorStack = error instanceof Error ? error.stack : undefined;
    
            const exceptionMessage = `Tool execution failed with exception: ${errorMsg}${errorStack ? `\n\nStack trace:\n${errorStack}` : ""}`;
    
            return {
              content: [
                {
                  type: "text",
                  text: `❌ ${exceptionMessage}`,
                },
              ],
            };
          }
        }
      );
    });
  • Core utility method for making authenticated and timed API calls to the Minecraft Wiki MediaWiki API.
    private async callMediaWikiAPI(params: Record<string, string>): Promise<any> {
        const baseParams = {
            format: 'json',
            origin: '*',
            ...params
        };
        
        const url = `https://minecraft.wiki/api.php?${new URLSearchParams(baseParams)}`;
        
        try {
            // タイムアウト付きでfetch APIを使用
            const controller = new AbortController();
            const timeoutId = setTimeout(() => controller.abort(), 8000); // 8秒タイムアウト
            
            const response = await fetch(url, {
                method: 'GET',
                headers: {
                    'User-Agent': 'Minecraft-Bedrock-MCP-Server/1.0',
                    'Accept': 'application/json'
                },
                signal: controller.signal
            });
            
            clearTimeout(timeoutId);
            
            if (!response.ok) {
                throw new Error(`HTTP ${response.status}: ${response.statusText}`);
            }
            
            const data = await response.json() as any;
            
            if (data.error) {
                throw new Error(`MediaWiki API Error: ${data.error.info || data.error.code}`);
            }
            
            return data;
        } catch (error) {
            if (error instanceof Error && error.name === 'AbortError') {
                throw new Error('MediaWiki API request timed out (8 seconds)');
            }
            throw new Error(`MediaWiki API call failed: ${error instanceof Error ? error.message : String(error)}`);
        }
    }
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It effectively describes key behaviors: the tool returns accurate, up-to-date information from the official wiki, excludes Java Edition features, and recommends sequence-based approaches to manage response complexity. It doesn't mention rate limits, authentication needs, or error handling, but provides substantial operational guidance.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and front-loaded with core functionality, followed by usage recommendations. Every sentence adds value: the first establishes scope, the second addresses data quality, the third provides operational guidance. It could be slightly more concise but maintains good information density without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex tool with 7 parameters, no annotations, and no output schema, the description provides substantial context about scope, data sources, and recommended usage patterns. It doesn't describe return formats or error conditions, but given the schema's comprehensive parameter documentation and the description's operational guidance, it's reasonably complete for an information retrieval tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 7 parameters thoroughly. The description adds minimal parameter-specific information beyond what's in the schema - it mentions using 'sequence' for step-by-step gathering but doesn't explain parameter interactions or provide examples beyond what the schema already contains. Baseline 3 is appropriate when schema does heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool searches the Minecraft Wiki for specific editions (Bedrock and Education) and content types (commands, blocks, items, entities, mechanics), explicitly excluding Java Edition features. It distinguishes itself from sibling tools like 'execute_command' or 'blocks' by focusing on information retrieval rather than game interaction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool versus alternatives: it specifies using the 'sequence' action for step-by-step information gathering to avoid overwhelming responses, and outlines a specific workflow (search → get page → get section). This gives clear operational context beyond basic tool invocation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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/Mming-Lab/minecraft-bedrock-mcp-server'

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