Skip to main content
Glama

set_gamemode

Change a player's game mode on a Minecraft server using RCON commands. Specify target player and desired mode (survival, creative, adventure, or spectator) for server administration.

Instructions

Change a player's game mode.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetYesPlayer selector (e.g., '@a', 'PlayerName')
gamemodeYesGame mode

Implementation Reference

  • The handler function for the 'set_gamemode' tool, which sends a command to the RCON manager.
    async ({ target, gamemode }) => {
      try {
        const response = await manager.rcon.send(
          `gamemode ${gamemode} ${target}`
        );
        return { content: [{ type: "text", text: response }] };
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: `Failed: ${error instanceof Error ? error.message : String(error)}`,
            },
  • Input schema for the 'set_gamemode' tool.
    {
      target: z.string().describe("Player selector (e.g., '@a', 'PlayerName')"),
      gamemode: z
        .enum(["survival", "creative", "adventure", "spectator"])
        .describe("Game mode"),
    },
  • Registration of the 'set_gamemode' tool using the server.tool method.
    server.tool(
      "set_gamemode",
      "Change a player's game mode.",
      {
        target: z.string().describe("Player selector (e.g., '@a', 'PlayerName')"),
        gamemode: z
          .enum(["survival", "creative", "adventure", "spectator"])
          .describe("Game mode"),
      },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but fails to deliver. It states 'Change' implying mutation, but doesn't disclose persistence (does it survive restarts?), permissions required, side effects (inventory handling), or whether it affects currently offline players. Minimal disclosure.

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

Conciseness4/5

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

The description is a single efficient sentence with zero waste. However, given the lack of annotations and output schema, it is arguably too terse—it could have utilized the space to disclose behavioral traits or usage constraints while remaining concise.

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

Completeness2/5

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

For a mutation tool affecting player state with no annotations and no output schema, the description is insufficient. It fails to document execution requirements (permissions), scope limitations (online vs offline players), or return behavior. With 100% schema coverage but zero behavioral context, completeness is lacking.

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

Parameters3/5

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

Schema description coverage is 100%, with both parameters fully documented (target includes selector syntax examples, gamemode includes enum values). The description adds no semantic information beyond the schema, which is acceptable when schema coverage is complete, meeting the baseline of 3.

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?

The description uses a clear verb ('Change') and identifies the specific resource ('player's game mode'). While 'game mode' is distinct from 'game rules' (sibling set_game_rule) and other set_ operations, the description doesn't explicitly differentiate from similar sibling tools, though the term is specific enough to avoid major confusion.

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?

The description provides no guidance on when to use this tool versus alternatives, prerequisites (e.g., operator permissions), or constraints. It doesn't mention when not to use it or what happens if the target is offline.

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