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.
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, }; } }