Lab Gateway
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LAB_GATEWAY_RUN_DIR | No | Directory where the run's ledger, requests and results are stored, e.g. "runs/agent". | |
| LAB_GATEWAY_SCENARIO | No | Scenario the simulated vendor systems run, e.g. "demo". |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Measurements on an HPLC (purity), an LC-MS (plasma stability) and an NMR (structure).
Call list_instruments first: it lists each instrument's approved method versions and their acceptance criteria.
Every request needs a request_id you choose. Reusing it returns the same request; it never runs twice.
get_measurement with wait_s long-polls until the state changes.
unknown or needs_operator means the instrument is held until a person resolves it. Do not work around it.
A run can finish and still be unusable. Use only results with usable=true for design decisions.
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
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_instrumentsA | List the instruments, the vendor software and interface behind each, readiness, which request holds each one, and the approved method versions with their acceptance criteria. |
| request_measurementA | Request a measurement under an approved method version. sample_manifest: [{"sample_id", "position", "kind": sample|control, "barcode", "attrs": {...}}]. Standards and blanks come from the method's own template; list only your samples. request_id: your idempotency key (3-64 chars). The same id with the same content returns the existing request; nothing is sent twice. dry_run=true runs every check and sends nothing. |
| get_measurementA | State, progress and (when done) the QC verdict, findings and provenance of a request. wait_s: wait up to this many seconds for the state to change (long poll). |
| cancel_measurementB | Cancel a queued or running request. Requests with an unknown outcome are an operator's call. |
| read_ledgerB | The record of every call that changed an instrument, with a check that the chain is intact. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 5 tools
Each tool has a distinct role in the lab workflow: discovery, request creation, status retrieval, cancellation, and audit review. The boundaries between request_measurement/get_measurement and list_instruments/read_ledger are clear from their descriptions.
All tool names follow a consistent snake_case verb_noun pattern: list_instruments, request_measurement, get_measurement, cancel_measurement, read_ledger. There are no mixed conventions or vague names.
Five tools is well within the appropriate range and each tool maps to a necessary operation in the lab measurement lifecycle. The set is focused rather than padded.
The core lifecycle is covered: list instruments/methods, request a measurement, poll status, cancel, and audit the ledger. A way to list or discover existing measurement requests would close a minor gap, but most workflows can proceed using the request_id idempotency key.