Skip to main content
Glama

detect-gamemode

Identify the current game mode in Minecraft to determine available actions and gameplay rules for character control.

Instructions

Detect the gamemode on game

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'detect-gamemode' tool. It retrieves the current bot's gamemode from `bot.game.gameMode` and returns a formatted response using `factory.createResponse`.
    async () => { const bot = getBot(); return factory.createResponse(`Bot gamemode: "${bot.game.gameMode}"`); }
  • The registration of the 'detect-gamemode' tool using `factory.registerTool`, including name, description, empty input schema, and inline handler.
    factory.registerTool( "detect-gamemode", "Detect the gamemode on game", {}, async () => { const bot = getBot(); return factory.createResponse(`Bot gamemode: "${bot.game.gameMode}"`); } );
  • src/main.ts:57-57 (registration)
    Invocation of `registerGameStateTools` in the main application, which registers the 'detect-gamemode' tool among others.
    registerGameStateTools(factory, getBot);

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/yuniko-software/minecraft-mcp-server'

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