get_game_rules
Retrieve all current game rules for a Minecraft world using RCON commands. This tool helps server administrators view and manage world settings while the server is running.
Instructions
Get all game rules for the current world via RCON. Server must be running.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/config-tools.ts:83-100 (handler)The implementation of the get_game_rules tool, which calls the manager.rcon.send("gamerule") method to fetch game rules.
server.tool( "get_game_rules", "Get all game rules for the current world via RCON. Server must be running.", {}, async () => { try { const response = await manager.rcon.send("gamerule"); return { content: [{ type: "text", text: response }] }; } catch (error) { return { content: [ { type: "text", text: `Failed to get game rules: ${error instanceof Error ? error.message : String(error)}\nIs the server running with RCON enabled?`, }, ], isError: true, };