detect-gamemode
Identify the current game mode in Minecraft using the MCP server powered by Mineflayer API. Enables real-time interaction and control within the game environment for enhanced player experiences.
Instructions
Detect the gamemode on game
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/gamestate-tools.ts:9-12 (handler)The handler function for the 'detect-gamemode' tool. It retrieves the bot instance and returns the current game mode from bot.game.gameMode wrapped in a response.async () => { const bot = getBot(); return factory.createResponse(`Bot gamemode: "${bot.game.gameMode}"`); }
- src/tools/gamestate-tools.ts:5-13 (registration)Registration of the 'detect-gamemode' tool using factory.registerTool, specifying the tool name, description, empty input schema, and the handler function.factory.registerTool( "detect-gamemode", "Detect the gamemode on game", {}, async () => { const bot = getBot(); return factory.createResponse(`Bot gamemode: "${bot.game.gameMode}"`); } );
- src/tools/gamestate-tools.ts:8-8 (schema)Empty input schema for the 'detect-gamemode' tool, indicating no input parameters are required.{},