Skip to main content
Glama

execute_command

Execute Minecraft server commands remotely via RCON to manage gameplay, modify world settings, and control server operations.

Instructions

Execute a Minecraft server command via RCON. Send any command without the leading '/'. Examples: 'time set 0', 'weather clear', 'give @a diamond 64', 'tp @a 0 64 0', 'setblock 0 64 0 diamond_block'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYesMinecraft command to execute (without leading '/')

Implementation Reference

  • The handler logic for 'execute_command' which calls 'manager.rcon.send(command)'.
      async ({ command }) => {
        try {
          const response = await manager.rcon.send(command);
          return {
            content: [
              {
                type: "text",
                text: response || "(Command executed, no response)",
              },
            ],
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Failed to execute command: ${error instanceof Error ? error.message : String(error)}`,
              },
            ],
            isError: true,
          };
        }
      }
    );
  • The input schema for 'execute_command' using Zod.
    {
      command: z
        .string()
        .describe("Minecraft command to execute (without leading '/')"),
    },
  • The MCP tool registration for 'execute_command'.
    server.tool(
      "execute_command",
      "Execute a Minecraft server command via RCON. Send any command without the leading '/'. Examples: 'time set 0', 'weather clear', 'give @a diamond 64', 'tp @a 0 64 0', 'setblock 0 64 0 diamond_block'.",
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden. It discloses the RCON protocol and the leading-slash convention, but fails to mention safety characteristics (commands can be destructive), authentication requirements, or return value format.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely efficient two-sentence structure. Front-loaded with the core action, followed immediately by the critical syntax rule and compact, illustrative examples. No redundant words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Adequate for a single-parameter tool but insufficient given the high-risk nature of arbitrary command execution. Lacks safety warnings about destructive capabilities, error handling details, and guidance for selecting between this generic tool and the many specific alternatives available.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite 100% schema coverage, the description adds significant value through concrete examples ('time set 0', 'give @a diamond 64') that illustrate valid command syntax and semantics beyond the schema's generic string description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states it executes Minecraft server commands via RCON with specific transport protocol mentioned. However, it does not distinguish from the sibling tool 'execute_commands' (plural) or clarify when to use this generic tool versus specific task tools like 'set_time' or 'give_item'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides concrete examples of valid commands but offers no explicit when-to-use guidance, prerequisites (e.g., RCON connection requirements), or warnings about when to prefer specific sibling tools over this generic execution interface.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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