SiLA 2 Bridge

v0.1.2
io.github.K-Dense-AI/labmcp-sila2 Checked 1 day ago Published 2 months ago

MCP bridge to any SiLA 2 server (lab-automation standard).

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_connection_info Get Connection Info

Report which instrument is connected (identity, address, simulated or real), whether the server is read-only, and the active safety limits. Call this first.

get_command_log Get Command Log

Return the most recent raw commands sent to / replies received from the instrument (newest last). Useful for debugging and for recording what was done.

ParameterTypeDescription
limitinteger

reconnect Reconnect

Close and re-open the connection to the instrument (e.g. after it was power cycled or a cable was re-plugged).

discover_servers Discover Servers

Find SiLA 2 servers on the local network with SiLA Server Discovery (mDNS `_sila._tcp`). Lists name, UUID, address and port of each without connecting. Does not need a configured server.

ParameterTypeDescription
timeout_snumberHow long to listen for mDNS announcements

get_server_info Get Server Info

Identify the connected SiLA server (name, type, UUID, version, vendor, description), list its features, and say whether commands can be cancelled and which commands this bridge may call.

list_features List Features

Describe the server's features from their Feature Definitions: every command (observable or not, parameters, responses, intermediate responses, defined errors, and whether the allow-list permits calling it) and every property, with types rendered as JSON-schema-like dicts including units and constraints.

ParameterTypeDescription
featureOnly this feature (identifier); default all
include_corebooleanInclude the SiLAService core feature
include_fdlbooleanAlso return the raw Feature Definition XML

get_property Get Property

Read the current value of a SiLA property (for observable properties: the first value of a subscription).

ParameterTypeDescription
feature *stringFeature identifier, e.g. 'TemperatureController'
property *string
metadataSiLA client metadata, e.g. {'LockController.LockIdentifier': '...'} (if the server requires it)

subscribe_property Subscribe Property

Collect a property's values for `duration_s` seconds (SiLA subscription for observable properties, polling otherwise) and summarise them (e.g. watch a temperature settle).

ParameterTypeDescription
feature *stringFeature identifier, e.g. 'TemperatureController'
property *string
duration_snumberHow long to collect updates
max_updatesintegerStop after this many updates
metadataSiLA client metadata, e.g. {'LockController.LockIdentifier': '...'} (if the server requires it)
poll_interval_snumberPolling interval for unobservable properties

call_command Call Command

Run a SiLA command. This may physically act on the device (move, dispense, heat, shake, open doors): tell the user what will happen first. Parameters are validated against the Feature Definition before anything is sent, and the command must be in the allow-list if one is set. Unobservable commands return their responses; observable ones return an `execution_id`.

ParameterTypeDescription
command *stringCommand identifier
feature *stringFeature identifier, e.g. 'TemperatureController'
metadataSiLA client metadata, e.g. {'LockController.LockIdentifier': '...'} (if the server requires it)
parametersobjectParameter identifier -> value, as described by list_features
wait_snumberObservable commands: wait up to this long for completion (0 = return at once)

get_command_status Get Command Status

Status of an observable command started with `call_command`: waiting / running / finishedSuccessfully / finishedWithError, progress, estimated remaining time and the latest intermediate response.

ParameterTypeDescription
execution_id *string

get_command_result Get Command Result

Responses of a finished observable command, or the SiLA execution error it finished with. Fails with a clear message if the command is still running.

ParameterTypeDescription
execution_id *string

list_executions List Executions

All observable command executions started in this session, newest last, with their status.

cancel_command Cancel Command

Cancel a running observable command, or all commands, through SiLA's CancelController feature. Always available (even read-only). If the server has no CancelController, this explains that and points to the device's own stop command.

ParameterTypeDescription
all_commandsbooleanCancel every running command on the server
execution_idExecution to cancel; omit (or all_commands=true) to cancel everything