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
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": "server_list"
}
}Input 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 }; } } );