list_players
Retrieve a list of all currently online players and view the server's maximum player capacity for Minecraft server administration.
Instructions
List all online players and the server's max player count.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_players"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/player-tools.ts:15-34 (handler)The handler for the 'list_players' tool. It sends a 'list' command via RCON and returns the server's response.
server.tool( "list_players", "List all online players and the server's max player count.", {}, async () => { try { const response = await manager.rcon.send("list"); return { content: [{ type: "text", text: response }] }; } catch (error) { return { content: [ { type: "text", text: `Failed: ${error instanceof Error ? error.message : String(error)}`, }, ], isError: true, }; } }