Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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,
          };

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/tamo2918/Minecraft-Server-MCP'

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