server_list
List all Minecraft servers managed by Crafty Controller with their IDs, names, types, ports, and configurations for monitoring and management.
Instructions
List all Minecraft servers managed by Crafty Controller with their IDs, names, types, ports, and configurations
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/servers.ts:6-19 (handler)Implementation of the 'server_list' tool handler which queries the Crafty Controller API for a list of servers.
server.tool( "server_list", "List all Minecraft servers managed by Crafty Controller with their IDs, names, types, ports, and configurations", {}, async () => { try { const data = await client.get("/servers"); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } catch (error) { const msg = error instanceof Error ? error.message : String(error); return { content: [{ type: "text", text: `Error: ${msg}` }], isError: true }; } } );