MCP has no host_list: the fleet is only visible through error messages #108
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
[claude 2026-09-01] The /mcp tool surface exposes 14 tools (
internal/mcpserver/server.go:57) and not one of them lists hosts. A model driving eitri over MCP cannot answer "what hosts are there, which are online, what networks do they advertise, what agent version do they run" — it can only place a VM and find out.The data is already on the interface.
toolsAPI.ListHosts(internal/mcpserver/tools.go:26) is called byFirstEligibleHostfor default placement and byresolveHostwhen the caller names a host, anddescribeHosts/describeHostNetworks(tools.go:415,430) already render a fleet summary for humans — but only inside error strings. Today the only way for a model to learn the host names is to guess one wrong and read the 400, or to ask for a network nobody advertises and read the "online hosts advertise: ..." line. Discovery-by-failure.Where it bites:
vm_createtakeshost("host name to place on; default first eligible host", tools.go:172) with no way to enumerate the legal values.describeHostNetworksrenders into an error.e698610c(VMs cannot move between hosts) means the host choice at create is the final one. Choosing it blind is a poor trade.volumes, unmerged) makes this sharper: a bound claim pins its host, and a volume-bearing create on the wrong host is a 409. A model that cannot see hosts cannot see where its data lives.Suggested shape —
host_list, read-only, mirroringvm_list: id, name, online, agent_version, host_networks, and whether it is placeable (theplaceablepredicate at tools.go:87 is the existing rule). Consider surfacing capacity too if it is cheap, since it is the other thing a placement decision wants.Note the console and CLI already show hosts; MCP is the surface that does not.
Migrated from git-collab issue
999147f6315962c8bfae4b724ddc63076cc4bd3f.Original author: a73x dev@a73x.sh.