labgrid-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LG_HOSTNAME | No | Identity hostname, as in labgrid-client; defaults to the real hostname | |
| LG_USERNAME | No | Identity username, as in labgrid-client; defaults to the real username | |
| LG_COORDINATOR | No | Coordinator address | 127.0.0.1:20408 |
| LABGRID_MCP_ALLOW | No | Comma-separated list of tool categories to register; 'flash' and 'place_delete' must be explicitly listed | |
| LABGRID_MCP_READONLY | No | Set to '1' to register only read-only tools: the Read group plus wait_for_change and forward_list | off |
| LABGRID_MCP_SSH_KEYFILE | No | Private key for the SSH tools; if unset, SSH tools error clearly at call time | |
| LABGRID_MCP_ACQUIRE_TIMEOUT | No | Max seconds acquire_place waits for allocation | 120 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| coordinator_infoA | Report the coordinator connection. Returns the coordinator address, the client's claimed identity, whether the subscription is currently connected, and the coordinator version if the protocol provides one (currently null). |
| list_placesA | All places known to the coordinator, as labgrid place dicts. |
| show_placeA | One place by exact name. Raises a tool error if unknown. |
| whoA | Currently acquired places by host/user (derived from the snapshot). |
| list_resourcesA | All exporter resources known to the coordinator. |
| list_reservationsC | Current reservations (live unary RPC to the coordinator). |
| wait_for_changeA | Long-poll for the next place/resource change (design §11.12 -- the live-monitor substitute; FastMCP has no subscription surface). |
| reserveB | Create a reservation (with the given filters/priority) and keep
it alive in the background until it is cancelled, expires, or is
invalidated. Returns the serialized reservation, including its
|
| cancel_reservationB | Cancel a reservation by ID and stop its keepalive task. |
| reservation_waitA | Block-and-poll a reservation until it allocates a place, or times out. |
| acquire_placeA | Acquire a place by name for this session. |
| release_placeA | Release a place by name. By default this verifies we currently hold the place before releasing it; pass kick=True to release unconditionally regardless of the current holder. |
| allow_placeA | Allow another user to use a place this session has acquired. |
| release_fromA | Release |
| get_power_stateA | Current power state for a place this server has acquired. |
| set_powerA | Drive power on/off/cycle on an acquired place, then return the resulting state. |
| get_ioA | Current digital IO state for an acquired place (HttpDigitalOutputDriver.get()). |
| set_ioA | Set digital IO on an acquired place, then re-read and return the resulting state (HttpDigitalOutputDriver.set() then .get()). |
| get_sd_muxA | Current SD-mux mode for an acquired place ( |
| set_sd_muxA | Set the SD mux mode on an acquired place (USBSDMuxDriver.set_mode()). |
| set_usb_muxB | Set USB mux links on an acquired place (LXAUSBMuxDriver.set_links()). |
| console_openA | Open an interactive console session on an acquired place. |
| console_readA | Drain up to |
| console_sendA | Write |
| console_closeA | Close a console session: stop and join its reader, then deactivate the driver. Idempotent; an unknown session is a tool error. |
| forward_listA | List all live forward tunnels across every place (forwards.sessions()). |
| ssh_runA | Run |
| put_fileA | Copy a local file to |
| get_fileA | Copy |
| forward_openA | Open a local port-forward tunnel to |
| forward_remote_openA | Open a REMOTE ( |
| forward_closeA | Close a forward tunnel by id ( |
| add_placeA | Create a new place by name. No ownership check -- a brand-new name can never collide with an existing acquisition. |
| add_place_aliasA | Add an alias to an existing place. |
| delete_place_aliasA | Remove an alias from an existing place. |
| set_place_tagsA | Set tags on an existing place. |
| set_place_commentA | Set an existing place's free-form comment (unvalidated by the coordinator). |
| add_place_matchA | Add a resource match to an existing place. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| places | JSON array of the places known to the coordinator (empty until synced). |
| resources_resource | JSON array of the resources known to the coordinator. |
| reservations_resource | JSON array of current reservations. |
| sessions_resource | JSON of live console sessions, forward tunnels, AND background flash jobs. ``{"consoles": [...], "forwards": [...], "jobs": [...]}`` (consoles.sessions(), forwards.sessions(), jobs.jobs()). Unconditional like the other resources -- registered even when Category.CONSOLE/ Category.SSH/Category.FLASH tools are gated off (readonly mode included). ``created``/``finished`` inside each job entry are MONOTONIC-clock values (process-relative, not wall-clock timestamps) -- passed through as-is, never rendered or converted here. Each job entry is normalized like ``flash_status``: canonical ``kind`` plus the additive ``loader`` field (``None`` except non-default bootstrap). |
TDQS
Scored across 38 tools
Most tools target a clearly distinct resource+action (list_places vs show_place, get_power_state vs set_power, forward_open vs forward_remote_open). The two closest pairs — release_place vs release_from, and add_place_alias vs delete_place_alias — are explicitly differentiated in their descriptions. Only minor overlap remains, so an agent can reliably choose.
Two competing conventions coexist: verb_noun (list_places, set_power, add_place_match) and noun_verb (reservation_wait, console_send, forward_open, ssh_run), plus bare verbs (reserve, who). Each pattern is internally consistent per domain family and stays readable, but the set as a whole is mixed rather than uniform.
At 38 tools this is well above the 'heavy' threshold, and the surface is quite granular (separate get/set pairs for power, io, and sd_mux). The domain is genuinely broad, but the sheer count makes discovery harder than necessary.
Core lifecycle is covered well: places (acquire/release/allow/release_from), reservations (reserve/cancel/wait/list), console, forwards, ssh, and place metadata. However there is no delete_place and, notably, add_place_match exists without a matching delete_place_match (referenced in descriptions but unregistered), leaving real teardown gaps.