Skip to main content
Glama

op_player

Grant operator privileges to a player on a Minecraft Java Edition server, enabling administrative control for server management and moderation.

Instructions

Grant operator status to a player.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
playerYesPlayer name

Implementation Reference

  • Implementation of the 'op_player' tool handler in 'src/tools/player-tools.ts'. It takes a player name as input and sends an 'op' command via RCON.
    server.tool(
      "op_player",
      "Grant operator status to a player.",
      {
        player: z.string().describe("Player name"),
      },
      async ({ player }) => {
        try {
          const response = await manager.rcon.send(`op ${player}`);
          return { content: [{ type: "text", text: response }] };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Failed: ${error instanceof Error ? error.message : String(error)}`,
              },
            ],
            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