Skip to content

MCP tools

What an AI assistant can do through LabOrchestra’s MCP server (/mcp on the server, or laborchestra mcp serve as a local bridge). AI access is off until it is switched on, on the Devices page (AI access). In read-only mode only the tools that look are offered; control adds those that act. Every action an assistant takes is recorded with the name of its connection.

Tool Parameters (?: optional) What it does
list_devices none All devices and background services with their status (ready, degraded, error, starting, …), kind, class and profiles. Start here.
describe_device device What a device offers: its options, actions (name, parameters with types, what it does), units of state fields and profiles. Read this before calling an action.
get_state device, path? The live state of a device, or one part of it (path such as channels.1.pressure). Values are in the units of the schema; null means no valid reading. device_status says whether the device is running: while it is in error or starting, the values are the last ones it reported.
wait_for device, path, condition, value?, timeout_s? Waits until a state field meets a condition, or the time is up (at most 120 s). Use it for slow effects instead of polling. condition: equals, not_equals, above, below, is_null, not_null.
list_widgets none The dashboard widgets of the workspace (widgets/*.tsx) with their version and the build error, if any: a widget that built has error null. A build error names file, line and column.
get_docs topic? Guides for writing what is specific to this lab: devices, services, procedures, widgets and scripts, with the rules for names and values. Without a topic: the list of topics. Read the topic before you write such a file.
get_problems none Everything that is failing right now: devices and services in error or degraded status, channels whose status is not ok (the device runs but a reading or a stage is not valid), procedure files that cannot be loaded, and the errors in the log that are still current (a device that keeps failing and restarting is in error only between its attempts, so look at recent_errors when ok is false and devices is empty) (a device’s errors until it was restarted, other errors for 10 minutes). file_missing lists devices that run but whose file was removed or renamed (they will not start again). needs_restart lists devices whose file changed after they started (they still run the old code: restart_device). ok is false while anything else here exists. Call this after something went wrong.
get_logs source?, level?, since_cursor?, limit? Log entries (newest last). since_cursor: the cursor of an earlier call returns only newer entries. source: e.g. device:pressure, server, run:.
get_events device?, kind?, last_minutes?, limit? What happened to devices: actions with who made them (ui, script, run:, mcp:
get_history device, path, last_minutes?, max_points? The recorded history of a numeric state field as [unix time, value] pairs (also outside recordings), thinned to max_points.
list_procedures none The measurement procedures (Python functions, of the workspace and shipped ones such as timed_recording) with their parameters, devices they use and the events that start them, and the presets: saved parameter sets (run one with run_procedure and its params).
list_runs limit? The latest procedure runs with status, progress and outcome.
get_run id?, run_id? One procedure run: status, progress, message, result or error.
wait_for_run id?, run_id?, timeout_s? Waits until a procedure run has ended (finished, failed, aborted or crashed) or the time is up (at most 120 s), and returns it.
get_recording none Whether a recording is going on (name, elapsed time, tags).
list_recordings limit? The latest recordings and snapshots with their tags.
get_notes reference?, limit? Notes of the lab notebook (newest last), optionally those that refer to a device or recording.
Tool Parameters (?: optional) What it does
call_action device, action, args? Calls an action of a device (see describe_device for names and parameters; args is a list in that order). This acts on real hardware. Returns the result when the effect is in the state.
restart_device device Stops a device or service and starts it again, so that it runs the file as it is now (use it after editing a device file; get_problems lists devices with needs_restart). Refused while a recording goes on. Returns when the new worker has been started; then look at get_problems and get_logs.
run_procedure name, params? Starts a measurement procedure (see list_procedures) with parameters, and returns the run at once; follow it with wait_for_run or get_run. Refused when a device it uses is reserved by another run.
abort_run id?, run_id?, force? Aborts a procedure run: its cleanup code runs, so devices return to a safe state. force kills it at once without cleanup (last resort).
start_recording name, tags? Starts a recording of every change of every device (with the full state at start and end). tags: free key/values stored in its header. Only one recording at a time.
stop_recording none Stops the recording that is going on and keeps it.
take_snapshot name, tags? Saves the state of all devices now in one file.
add_note text, refs? Adds a note to the lab notebook, optionally referring to devices or recordings (refs: ids).