Skip to main content
Glama
zeeweebee

Minecraft MCP Server

by zeeweebee

detect-gamemode

Identify the current game mode in Minecraft to enable appropriate AI-controlled actions and interactions within the game world.

Instructions

Detect the gamemode on game

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'detect-gamemode' tool. It returns the current game mode of the bot by accessing bot.game.gameMode.
    async (): Promise<McpResponse> => {
      try {
        return createResponse(`Bot gamemode: "${bot.game.gameMode}"`);
      } catch (error) {
        return createErrorResponse(error as Error);
      }
    }
  • src/bot.ts:634-646 (registration)
    The registration of the 'detect-gamemode' tool using server.tool() with an empty input schema and inline handler function.
      server.tool(
        "detect-gamemode",
        "Detect the gamemode on game",
        {},
        async (): Promise<McpResponse> => {
          try {
            return createResponse(`Bot gamemode: "${bot.game.gameMode}"`);
          } catch (error) {
            return createErrorResponse(error as Error);
          }
        }
      );
    }

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/zeeweebee/mcp-server'

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