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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"player": "<player>"
},
"name": "op_player"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| player | Yes | Player name |
Implementation Reference
- src/tools/player-tools.ts:38-60 (handler)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, }; } } );