API reference | LabBench CLI reference | MCP reference | Guide: set up a lab
labbench mcp serves the CLI's commands as MCP tools over stdio. It signs in the way any command does: --server and --token, the LABBENCH_SERVER and LABBENCH_TOKEN variables, then the config file that labbench login writes.
Claude Code:
claude mcp add labbench -e LABBENCH_SERVER=https://your-labbench.example -e LABBENCH_TOKEN=lbt_... -- labbench mcp
Any other MCP client that takes a JSON server list:
{
"mcpServers": {
"labbench": {
"command": "labbench",
"args": ["mcp"],
"env": {
"LABBENCH_SERVER": "https://your-labbench.example",
"LABBENCH_TOKEN": "lbt_..."
}
}
}
}
billing_historybilling_showcategories_addcategories_listcategories_removecategories_updatecheckouts_returncheckouts_takeitems_category_clearitems_category_setitems_listitems_low-stock_setitems_shelf_clearitems_shelf_setitems_study-articlekiosks_identifykiosks_listkiosks_pairing-codes_confirmkiosks_pairing-codes_createkiosks_pairing-codes_listkiosks_rejectionskiosks_set-first-locationkiosks_unpairlab_createlab_getlab_listlab_settings_getlab_settings_pin-verificationlab_settings_set-signatureslab_settings_set-stale-hold-dayslab_settings_set-time-zonelab_updatelocations_createlocations_create-batchlocations_listlocations_removedlocations_restorelocations_shelves_createlocations_shelves_listlocations_shelves_renamelocations_shelves_reorderlocations_shelves_retirelocations_stocklocations_updatelog_exportlog_listlots_discardlots_editlots_importlots_put-awaylots_receivelots_receive-shipmentlots_showlots_unitslots_waitingmaterials_category_clearmaterials_category_setmaterials_listmaterials_low-stock_setmaterials_showmaterials_storage_setmembers_deactivatemembers_invite-batchmembers_listmembers_reactivatemembers_update-roleorganizations_invitationsorganizations_leaveorganizations_listoutflows_listpolicy-acceptances_listreconciliation_claimreconciliation_correct-custodyreconciliation_listreconciliation_minereconciliation_preparation_abandonreconciliation_preparation_listreconciliation_preparation_savereconciliation_reconcilereconciliation_showreconciliation_splitreconciliation_stale_closereconciliation_stale_listreconciliation_transferreports_expiryreports_holdingsreports_low-stocksetup_finishsetup_statusshipments_showshipments_waitingstudies_createstudies_liststudies_renamestudies_reportstudies_restorestudies_retirestudies_showstudies_updatetokens_listtokens_revokewhoamibilling_historyList the lab's newest invoices from Stripe, newest first The amount is what was paid for a paid invoice, and what is due for any other. When older invoices exist than were listed, hasMore is true; the dashboard's Manage billing, for a lab with a subscription, shows the full history.
Input schema:
{
"type": "object",
"properties": {
"limit": {
"type": "integer",
"description": "how many invoices to list, 1 to 100 (default 24)"
}
}
}
billing_showShow the lab's subscription status, plan and renewal
Input schema:
{
"type": "object",
"properties": {}
}
categories_addAdd a category (managers only) Add a category. Receiving a material whose name contains a --term as a whole word files its items under it. Needs a signed-in manager session (labbench login); an API token is refused.
Input schema:
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "category name"
},
"term": {
"type": "string",
"description": "match term; repeat the flag or separate with commas"
}
},
"required": [
"name"
]
}
categories_listList the lab's categories in display order List the lab's categories with the match terms that categorize a received material. Works with an API token or a signed-in session.
Input schema:
{
"type": "object",
"properties": {}
}
categories_removeRemove an unused category (managers only) Remove a category no stocked material uses. A category still in use is refused with the number of stock rows whose material uses it; re-file those materials first with `labbench items category set`. Needs a signed-in manager session (labbench login); an API token is refused.
Input schema:
{
"type": "object",
"properties": {
"category_id": {
"type": "string",
"description": "remove CATEGORY_ID"
}
},
"required": [
"category_id"
]
}
categories_updateRename a category or replace its match terms (managers only) Rename a category or replace its match terms; items keep their category. --term replaces the whole list, --no-terms empties it. Needs a signed-in manager session (labbench login); an API token is refused.
Input schema:
{
"type": "object",
"properties": {
"category_id": {
"type": "string",
"description": "update CATEGORY_ID"
},
"name": {
"type": "string",
"description": "new category name"
},
"no-terms": {
"type": "boolean",
"description": "remove every match term"
},
"term": {
"type": "string",
"description": "match term; repeat the flag or separate with commas. Replaces the current terms"
}
},
"required": [
"category_id"
]
}
checkouts_returnReturn some or all of a checkout; what isn't returned stays held CHECKOUT_ID is the id of the checkout to return, as printed by `checkouts take` or listed by `reconciliation list`. Whatever isn't returned stays held by you until you return it, or until you settle it as used, discarded or lost with `reconciliation reconcile`; returning the whole remainder closes the checkout. A return above what you still hold is refused.
Input schema:
{
"type": "object",
"properties": {
"checkout_id": {
"type": "string",
"description": "return CHECKOUT_ID"
},
"content": {
"type": "string",
"description": "content remaining in one returned measured container (for example 0.4mL)"
},
"location": {
"type": "string",
"description": "optional location to return unopened stock to"
},
"returned": {
"type": "integer",
"description": "how many go back on the shelf"
},
"shelf": {
"type": "string",
"description": "optional shelf id within the destination (--location, or where it was taken from)"
}
},
"required": [
"checkout_id",
"returned"
]
}
checkouts_takeTake stock of an item, or of a material Give --item to take from one stock row, or --material to take from the stock row the server picks by default: the soonest expiring lot that has stock, then the oldest receipt. A material with no default stock is refused and nothing is taken.
Input schema:
{
"type": "object",
"properties": {
"confirm-shortfall": {
"type": "boolean",
"description": "confirm a take above live shelf stock"
},
"item": {
"type": "string",
"description": "item id; give this or --material"
},
"material": {
"type": "string",
"description": "material name, to take its default stock row; give this or --item"
},
"quantity": {
"type": "integer",
"description": "how many to take"
},
"study": {
"type": "string",
"description": "optional active study id"
}
},
"required": [
"quantity"
]
}
items_category_clearTake an item's material out of its category (managers only) Leave the item's material, and every lot and place of it, uncategorized. Needs a signed-in manager session (labbench login); an API token is refused.
Input schema:
{
"type": "object",
"properties": {
"item_id": {
"type": "string",
"description": "clear ITEM_ID"
}
},
"required": [
"item_id"
]
}
items_category_setFile an item's material in a category (managers only) File the item's material, and so every lot and place of it, in one of the lab's categories, named by --category-id or by its exact --name (looked up with `labbench categories list`; an unknown or ambiguous name is refused before anything is written). Needs a signed-in manager session (labbench login); an API token is refused.
Input schema:
{
"type": "object",
"properties": {
"category-id": {
"type": "string",
"description": "id of the category"
},
"item_id": {
"type": "string",
"description": "set ITEM_ID"
},
"name": {
"type": "string",
"description": "exact name of the category"
}
},
"required": [
"item_id"
]
}
items_listList items with their on-hand quantity quantity is what is on the shelf now, available to take. Stock a member holds on a checkout is not counted in it; reconciliation list shows those holdings.
Input schema:
{
"type": "object",
"properties": {}
}
items_low-stock_setSet the low-stock level of an item's material (managers only) Set the low-stock level of the item's material, and so of every lot and place of it: --mode inherit follows the lab default, --mode off never flags it, and --mode override with --threshold N flags it at N or fewer. Repeating the same setting is safe. Needs a signed-in manager session (labbench login); an API token is refused.
Input schema:
{
"type": "object",
"properties": {
"item_id": {
"type": "string",
"description": "set ITEM_ID"
},
"mode": {
"type": "string",
"description": "inherit, off or override"
},
"threshold": {
"type": "integer",
"description": "with --mode override: flag the material at this many or fewer"
}
},
"required": [
"item_id"
]
}
items_shelf_clearTake an item's stock off its shelf (managers only) Leave the item's stock unshelved; it stays at its location. Repeating it is safe. Needs a signed-in manager session (labbench login); an API token is refused.
Input schema:
{
"type": "object",
"properties": {
"item_id": {
"type": "string",
"description": "clear ITEM_ID"
}
},
"required": [
"item_id"
]
}
items_shelf_setPut an item's stock on a shelf of its location (managers only) Put the item's stock on one of its location's active shelves (`labbench locations shelves list LOCATION_ID`). The item stays at its location. A retired shelf or one in another location is refused and the item keeps its shelf. Repeating the same request is safe; the command never retries on its own. Needs a signed-in manager session (labbench login); an API token is refused.
Input schema:
{
"type": "object",
"properties": {
"item_id": {
"type": "string",
"description": "set ITEM_ID"
},
"shelf-id": {
"type": "string",
"description": "id of an active shelf in the item's location"
}
},
"required": [
"item_id",
"shelf-id"
]
}
items_study-articleMark or unmark an item as a study article Sets the item's study-article flag; repeating the same flag is safe. Needs a signed-in session (labbench login); an API token is refused.
Input schema:
{
"type": "object",
"properties": {
"item_id": {
"type": "string",
"description": "study-article ITEM_ID"
},
"off": {
"type": "boolean",
"description": "clear the study-article mark"
},
"on": {
"type": "boolean",
"description": "mark the item as a study article"
}
},
"required": [
"item_id"
]
}
kiosks_identifyAsk a kiosk to show its identity (managers only; needs a signed-in session) Ask one paired kiosk to show its name and short id full-screen for a few seconds, so you can tell which tablet it is. This needs a signed-in manager session; an API token is refused with token_not_allowed.
Input schema:
{
"type": "object",
"properties": {
"kiosk_id": {
"type": "string",
"description": "identify KIOSK_ID"
}
},
"required": [
"kiosk_id"
]
}
kiosks_listList active kiosks
Input schema:
{
"type": "object",
"properties": {}
}
kiosks_pairing-codes_confirmConfirm the tablet that entered a pairing code
Input schema:
{
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "confirm CODE"
},
"label": {
"type": "string",
"description": "kiosk name (optional, at most 80 bytes)"
}
},
"required": [
"code"
]
}
kiosks_pairing-codes_createIssue a pairing code to enter on the tablet
Input schema:
{
"type": "object",
"properties": {}
}
kiosks_pairing-codes_listList outstanding pairing codes and the tablets that claimed them
Input schema:
{
"type": "object",
"properties": {}
}
kiosks_rejectionsList rejected Benchsheet actions
Input schema:
{
"type": "object",
"properties": {}
}
kiosks_set-first-locationSet or clear a kiosk's first location (managers only)
Input schema:
{
"type": "object",
"properties": {
"clear": {
"type": "boolean",
"description": "clear the first location"
},
"kiosk_id": {
"type": "string",
"description": "set-first-location KIOSK_ID"
},
"location": {
"type": "string",
"description": "location id"
}
},
"required": [
"kiosk_id"
]
}
kiosks_unpairUnpair a kiosk (managers only; needs a signed-in session) Revoke a kiosk's pairing; the tablet drops back to the pairing screen and must be paired again. --confirm is required. This needs a signed-in manager session; an API token is refused with token_not_allowed.
Input schema:
{
"type": "object",
"properties": {
"confirm": {
"type": "boolean",
"description": "confirm kiosk unpairing"
},
"kiosk_id": {
"type": "string",
"description": "unpair KIOSK_ID"
}
},
"required": [
"kiosk_id"
]
}
lab_createDeclare a new lab; you become its manager Declare a new lab. Without --organization the lab is Personal. With it, the lab is filed under the organization of that name you already belong to, or a new one you own; the lab's institution becomes the organization's name. --organization-kind and --owned-by are then required. Needs a signed-in session (labbench login); an API token is refused with 401.
Input schema:
{
"type": "object",
"properties": {
"allow-existing-lab": {
"type": "boolean",
"description": "explicitly allow declaring another lab"
},
"idempotency-key": {
"type": "string",
"description": "UUID to reuse when retrying an unknown result (default: a new UUID)"
},
"institution": {
"type": "string",
"description": "institution (ignored when --organization is given)"
},
"kind": {
"type": "string",
"description": "kind of lab, e.g. academic or industry"
},
"name": {
"type": "string",
"description": "lab name"
},
"organization": {
"type": "string",
"description": "organization to file the lab under, by name; matches only organizations you belong to"
},
"organization-kind": {
"type": "string",
"description": "institution, company or lab (with --organization); lab makes the lab its own organization and needs --owned-by organization"
},
"owned-by": {
"type": "string",
"description": "me (the organization is an affiliation) or organization (it owns the lab); with --organization"
}
},
"required": [
"name"
]
}
lab_getShow the selected lab's details
Input schema:
{
"type": "object",
"properties": {}
}
lab_listList every lab your account belongs to
Input schema:
{
"type": "object",
"properties": {}
}
lab_settings_getRead lab settings
Input schema:
{
"type": "object",
"properties": {}
}
lab_settings_pin-verificationSet whether Benchsheet requires PIN verification
Input schema:
{
"type": "object",
"properties": {
"true|false": {
"type": "string",
"description": "pin-verification \u003ctrue|false\u003e"
}
},
"required": [
"true|false"
]
}
lab_settings_set-signaturesSet whether records need signatures
Input schema:
{
"type": "object",
"properties": {
"required": {
"type": "boolean",
"description": "whether records need signatures"
}
},
"required": [
"required"
]
}
lab_settings_set-stale-hold-daysSet the stale-hold interval
Input schema:
{
"type": "object",
"properties": {
"days|off": {
"type": "string",
"description": "set-stale-hold-days DAYS|off"
}
},
"required": [
"days|off"
]
}
lab_settings_set-time-zoneSet the lab time zone
Input schema:
{
"type": "object",
"properties": {
"iana_name": {
"type": "string",
"description": "set-time-zone IANA_NAME"
}
},
"required": [
"iana_name"
]
}
lab_updateUpdate the selected lab's details (managers only)
Input schema:
{
"type": "object",
"properties": {
"institution": {
"type": "string",
"description": "institution"
},
"kind": {
"type": "string",
"description": "kind of lab"
},
"name": {
"type": "string",
"description": "lab name"
}
}
}
locations_createAdd a location (managers only)
Input schema:
{
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "description"
},
"kind": {
"type": "string",
"description": "location kind: room, freezer, fridge, incubator, cabinet, cold_room, or other"
},
"kind-label": {
"type": "string",
"description": "name for a kind of other, e.g. \"Cryogenic vault\"; required with --kind other and refused with any other kind"
},
"name": {
"type": "string",
"description": "location name, e.g. \"Freezer (-20°C)\""
},
"property": {
"items": {
"type": "string",
"description": ""
},
"type": "array",
"description": "property as key=value, e.g. \"Temperature=-60\"; repeat the flag for more. Seeded keys: Temperature, Humidity, Biosafety level, Hazard class, Room."
},
"temperature-c": {
"type": "integer",
"description": "whole-degree Celsius temperature"
}
},
"required": [
"name"
]
}
locations_create-batchAdd several locations at once (managers only)
Add several locations at once (managers only). Adds every location or none, in one transaction (up to 100). The input is a JSON array of {"name": ..., "description": ..., "kind": ..., "kind_label": ..., "temperature_c": ..., "properties": {...}} objects, from --file (a path, or - for stdin) or inline as --data. A refused batch names the 0-based row that caused it. Needs a signed-in session: an API token is refused.
Input schema:
{
"type": "object",
"properties": {
"data": {
"type": "string",
"description": "JSON array of rows, inline"
}
}
}
locations_listList the lab's locations
Input schema:
{
"type": "object",
"properties": {}
}
locations_removedList removed locations and who removed them (managers only)
Input schema:
{
"type": "object",
"properties": {}
}
locations_restoreRestore a removed location (managers only)
Input schema:
{
"type": "object",
"properties": {
"location_id": {
"type": "string",
"description": "restore LOCATION_ID"
}
},
"required": [
"location_id"
]
}
locations_shelves_createAdd a shelf to a location (managers only)
Input schema:
{
"type": "object",
"properties": {
"location_id": {
"type": "string",
"description": "create LOCATION_ID"
},
"name": {
"type": "string",
"description": "shelf name"
}
},
"required": [
"location_id",
"name"
]
}
locations_shelves_listList a location's configured shelves
Input schema:
{
"type": "object",
"properties": {
"location_id": {
"type": "string",
"description": "list LOCATION_ID"
}
},
"required": [
"location_id"
]
}
locations_shelves_renameRename a shelf in a location (managers only)
Input schema:
{
"type": "object",
"properties": {
"location_id": {
"type": "string",
"description": "rename LOCATION_ID SHELF_ID"
},
"name": {
"type": "string",
"description": "shelf name"
},
"shelf_id": {
"type": "string",
"description": "rename LOCATION_ID SHELF_ID"
}
},
"required": [
"location_id",
"shelf_id",
"name"
]
}
locations_shelves_reorderReplace a location's shelf order (managers only)
Input schema:
{
"type": "object",
"properties": {
"id": {
"items": {
"type": "string",
"description": ""
},
"type": "array",
"description": "shelf id in its desired order (repeat for each shelf)"
},
"location_id": {
"type": "string",
"description": "reorder LOCATION_ID"
}
},
"required": [
"location_id",
"id"
]
}
locations_shelves_retireRetire a shelf; its stock stays in the location without a shelf (managers only)
Input schema:
{
"type": "object",
"properties": {
"location_id": {
"type": "string",
"description": "retire LOCATION_ID SHELF_ID"
},
"shelf_id": {
"type": "string",
"description": "retire LOCATION_ID SHELF_ID"
}
},
"required": [
"location_id",
"shelf_id"
]
}
locations_stockShow what a location holds now: containers and materials (managers only)
Input schema:
{
"type": "object",
"properties": {
"location_id": {
"type": "string",
"description": "stock LOCATION_ID"
}
},
"required": [
"location_id"
]
}
locations_updateUpdate a location (managers only)
Input schema:
{
"type": "object",
"properties": {
"clear-properties": {
"type": "boolean",
"description": "remove every property"
},
"description": {
"type": "string",
"description": "description"
},
"kind": {
"type": "string",
"description": "location kind: room, freezer, fridge, incubator, cabinet, cold_room, or other"
},
"kind-label": {
"type": "string",
"description": "name for a kind of other, e.g. \"Cryogenic vault\"; required with --kind other and refused with any other kind"
},
"location_id": {
"type": "string",
"description": "update LOCATION_ID"
},
"name": {
"type": "string",
"description": "location name"
},
"property": {
"items": {
"type": "string",
"description": ""
},
"type": "array",
"description": "property as key=value, e.g. \"Temperature=-60\"; repeat the flag for more. Seeded keys: Temperature, Humidity, Biosafety level, Hazard class, Room. Replaces the whole property map."
}
},
"required": [
"location_id"
]
}
log_exportExport all matching activity evidence (up to 10,000 rows)
Input schema:
{
"type": "object",
"properties": {
"from": {
"type": "string",
"description": "RFC3339 lower time bound"
},
"item": {
"type": "string",
"description": "item id"
},
"to": {
"type": "string",
"description": "RFC3339 exclusive upper time bound"
},
"type": {
"items": {
"type": "string",
"description": ""
},
"type": "array",
"description": "event kind; repeat to keep any of several"
},
"user": {
"type": "string",
"description": "member id"
}
}
}
log_listList one bounded page of lab activity evidence
Input schema:
{
"type": "object",
"properties": {
"cursor": {
"type": "string",
"description": "opaque cursor from the previous page"
},
"from": {
"type": "string",
"description": "RFC3339 lower time bound"
},
"item": {
"type": "string",
"description": "item id"
},
"limit": {
"type": "integer",
"description": "maximum rows (the API limit is 100)"
},
"material": {
"type": "string",
"description": "material name, ignoring case and spacing (usage_by_study only)"
},
"preset": {
"type": "string",
"description": "report: usage_by_study, receiving_distribution, or reconciliation_audit (needs --from and --to)"
},
"study": {
"type": "string",
"description": "study id (usage_by_study only)"
},
"to": {
"type": "string",
"description": "RFC3339 exclusive upper time bound"
},
"type": {
"items": {
"type": "string",
"description": ""
},
"type": "array",
"description": "event kind; repeat to keep any of several"
},
"user": {
"type": "string",
"description": "member id: whose movements the feed lists, or whose use usage_by_study totals"
}
}
}
lots_discardDiscard all shelf stock of an expired lot
Input schema:
{
"type": "object",
"properties": {
"lot_id": {
"type": "string",
"description": "discard LOT_ID"
}
},
"required": [
"lot_id"
]
}
lots_editCorrect a lot number
Input schema:
{
"type": "object",
"properties": {
"lot-number": {
"type": "string",
"description": "corrected supplier lot number"
},
"lot_id": {
"type": "string",
"description": "edit LOT_ID"
}
},
"required": [
"lot_id",
"lot-number"
]
}
lots_importImport up to 300 lots atomically Map the user's columns to client_row_id, material, lot_number, unit, location_id, quantity, source, expires_on, content_per_unit, content_unit. The source column is the supplier. JSON rows may also carry supplier, maker and catalog_number; a maker or catalog number is recorded when the row creates the material or the material records none, and a row that states a different one than the material records, or than an earlier row, is refused (compared ignoring case). Show the proposed mapping and rows to the person, obtain explicit confirmation, then make this single import call. CSV uses that header and RFC 4180 quoting, with an optional final new_unit column (true, false or empty). JSON rows accept new_unit: true; --new-unit names each client_row_id to add deliberately. List known units with labbench lots units. Measures remain refused. Pass your own --idempotency-key (a UUID you keep) so an import whose answer is lost can be retried: rerun it with the same key and data and the API returns the first import with replayed true and stocks nothing again. Without the flag each run sends a new key. The same key with different data is refused with idempotency_key_reused.
Input schema:
{
"type": "object",
"properties": {
"data": {
"type": "string",
"description": "bounded JSON or CSV data; each row may carry new_unit: true (optional final CSV column)"
},
"format": {
"type": "string",
"description": "input format: json or csv"
},
"idempotency-key": {
"type": "string",
"description": "import key; resend the same key and data to retry safely (default: a new one)"
},
"new-unit": {
"items": {
"type": "string",
"description": ""
},
"type": "array",
"description": "client_row_id to deliberately add its counted unit; repeat per row"
}
},
"required": [
"data",
"format"
]
}
lots_put-awayPut a waiting lot balance away at one or more locations Put a waiting lot balance away. Give one destination with --location and --quantity (and optionally one of its shelves with --shelf), or several with a --to LOCATION_ID=QUANTITY per location: every destination is placed, or none is.
Input schema:
{
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "destination location id (one destination)"
},
"lot_id": {
"type": "string",
"description": "put-away LOT_ID"
},
"quantity": {
"type": "integer",
"description": "quantity to put away (one destination)"
},
"shelf": {
"type": "string",
"description": "optional shelf id within --location (one destination)"
},
"to": {
"items": {
"type": "string",
"description": ""
},
"type": "array",
"description": "LOCATION_ID=QUANTITY; repeat for each destination"
}
},
"required": [
"lot_id"
]
}
lots_receiveReceive a lot, optionally leaving stock waiting to be put away Any lab member may receive a lot. One run stocks one location. Each run sends an idempotency key and prints it: a dropped connection is retried within the run under that key, so it stocks once. If a run fails without an answer, rerun it with the same --idempotency-key and flags: the API replays the first receipt instead of stocking again. A rerun without the key is a new receive and stocks a second lot. `items list` shows the new stock. Needs a signed-in session: an API token is refused with token_write_not_allowed.
Input schema:
{
"type": "object",
"properties": {
"catalog-number": {
"type": "string",
"description": "the maker's catalog number, under the same rule as --maker"
},
"handling-notes": {
"type": "string",
"description": "handling guidance for a new material"
},
"humidity": {
"type": "string",
"description": "humidity guidance for a new material"
},
"idempotency-key": {
"type": "string",
"description": "receive key (UUID); resend the same key and flags to retry safely (default: a new one)"
},
"location": {
"type": "string",
"description": "location id, as `locations list` prints it"
},
"lot": {
"type": "string",
"description": "the supplier's lot number"
},
"maker": {
"type": "string",
"description": "who made the material; recorded when this receive creates the material or the material records none, and refused when the material records a different one (compared ignoring case)"
},
"material": {
"type": "string",
"description": "what the lot is, e.g. \"Taq polymerase\""
},
"new-unit": {
"type": "boolean",
"description": "deliberately add this counted unit if it is unknown; measures remain refused"
},
"quantity": {
"type": "integer",
"description": "how many units arrived"
},
"storage-temperature-from-c": {
"type": "number",
"description": "lower Celsius storage bound for a new material; left out, none is recorded"
},
"storage-temperature-to-c": {
"type": "number",
"description": "upper Celsius storage bound for a new material; left out, none is recorded"
},
"supplier": {
"type": "string",
"description": "who sold and shipped the lot, e.g. \"Fisher Scientific\""
},
"total": {
"type": "integer",
"description": "total received units, including units to put away later"
},
"unit": {
"type": "string",
"description": "what one unit is, e.g. tubes; list known units with labbench lots units"
}
},
"required": [
"lot",
"material",
"unit"
]
}
lots_receive-shipmentReceive one delivery of several lots, all or none
Any lab member, or a read-write API token, may receive a shipment. --lines is a JSON array of up to 20 lots: material, lot_number, unit and quantity are required; new_unit, client_line_id, location_id, shelf_id, stock, expires_on, content_per_unit, content_unit, storage_temperature_from_c, storage_temperature_to_c, humidity and handling_notes are optional. The storage temperatures are numbers in Celsius; they, humidity and handling_notes are recorded only when the shipment creates the material, from the first line that names it: later lines' values are ignored. A line with a location_id is stocked there in full. shelf_id optionally names an active shelf in the selected location. stock splits a line across places instead, as [{location_id, shelf_id, quantity}]; what no place takes waits to be put away, as does a line with neither. A line without a client_line_id is named by its position. Use new_unit: true on each line that deliberately adds a counted unit, or --new-unit CLIENT_LINE_ID (line-0 for the first unnamed line). List known units with labbench lots units. Measures remain refused. If any line is refused, nothing is recorded and the error names the line (0-based). Each run sends an idempotency key and prints it: a dropped connection is retried within the run under that key, so it records once. If a run fails without an answer, rerun it with the same --idempotency-key and flags: the API replays the first shipment instead of recording a second. The same key with other content is refused with idempotency_key_reused.
Input schema:
{
"type": "object",
"properties": {
"arrived-on": {
"type": "string",
"description": "arrival date, YYYY-MM-DD (optional)"
},
"idempotency-key": {
"type": "string",
"description": "shipment key (UUID); resend the same key and flags to retry safely (default: a new one)"
},
"lines": {
"type": "string",
"description": "JSON array of up to 20 lots; a lot may carry storage_temperature_from_c, storage_temperature_to_c, humidity and handling_notes for a new material"
},
"name": {
"type": "string",
"description": "the shipment's name, e.g. \"Fisher Scientific · Nov 13\""
},
"new-unit": {
"items": {
"type": "string",
"description": ""
},
"type": "array",
"description": "client_line_id to deliberately add its counted unit; repeat per line"
},
"order-number": {
"type": "string",
"description": "the order or receipt number (optional)"
},
"supplier": {
"type": "string",
"description": "who the delivery is from"
}
},
"required": [
"lines",
"name",
"supplier"
]
}
lots_showShow a lot and one bounded history page
Input schema:
{
"type": "object",
"properties": {
"history-cursor": {
"type": "string",
"description": "opaque cursor from the previous lots show output"
},
"lot_id": {
"type": "string",
"description": "show LOT_ID"
}
},
"required": [
"lot_id"
]
}
lots_unitsList the lab's counted units and unused common units
Input schema:
{
"type": "object",
"properties": {}
}
lots_waitingList received lots waiting to be put away
Input schema:
{
"type": "object",
"properties": {}
}
materials_category_clearTake a material out of its category (managers only) Leave the material, and every lot and place of it, uncategorized. MATERIAL is matched like `labbench materials show`. Needs a signed-in manager session (labbench login); an API token is refused.
Input schema:
{
"type": "object",
"properties": {
"material": {
"type": "string",
"description": "clear MATERIAL"
}
},
"required": [
"material"
]
}
materials_category_setFile a material in a category (managers only) File the material, and so every lot and place of it, in one of the lab's categories, named by --category-id or by its exact --name (looked up with `labbench categories list`; an unknown or ambiguous name is refused before anything is written). MATERIAL is matched like `labbench materials show`. Needs a signed-in manager session (labbench login); an API token is refused.
Input schema:
{
"type": "object",
"properties": {
"category-id": {
"type": "string",
"description": "id of the category"
},
"material": {
"type": "string",
"description": "set MATERIAL"
},
"name": {
"type": "string",
"description": "exact name of the category"
}
},
"required": [
"material"
]
}
materials_listList materials with on-hand totals and the default stock
Input schema:
{
"type": "object",
"properties": {
"acquired": {
"type": "boolean",
"description": "list only bought stock, as the Buying list offers it: split containers and lab-made lots are left out"
}
}
}
materials_low-stock_setSet a material's low-stock level (managers only) Set the material's one low-stock level, shared by every lot and place of it: --mode inherit follows the lab default, --mode off never flags it, and --mode override with --threshold N flags it when its stock pooled across lots is at N or fewer in some unit. Repeating the same setting is safe. MATERIAL is matched like `labbench materials show`. Needs a signed-in manager session (labbench login); an API token is refused.
Input schema:
{
"type": "object",
"properties": {
"material": {
"type": "string",
"description": "set MATERIAL"
},
"mode": {
"type": "string",
"description": "inherit, off or override"
},
"threshold": {
"type": "integer",
"description": "with --mode override: flag the material at this many or fewer"
}
},
"required": [
"material"
]
}
materials_showShow one material's storage, humidity and handling, lots, stock rows, holders, 30-day use, recent movements and default stock
Input schema:
{
"type": "object",
"properties": {
"material": {
"type": "string",
"description": "show MATERIAL"
}
},
"required": [
"material"
]
}
materials_storage_setReplace a material's storage guidance (managers only) Replace all four of the material's storage facts at once, for every lot and place of it. A flag you leave out clears its fact, and so does blank text (--humidity ""), so state every fact to keep; `labbench materials show` prints what is recorded now. Temperatures may be negative, and 0 is a real bound. Each changed fact is recorded in the Log. MATERIAL is matched like `labbench materials show`. Needs a signed-in manager session (labbench login); an API token is refused.
Input schema:
{
"type": "object",
"properties": {
"handling-notes": {
"type": "string",
"description": "handling guidance; left out or \"\", it is cleared"
},
"humidity": {
"type": "string",
"description": "humidity guidance; left out or \"\", it is cleared"
},
"material": {
"type": "string",
"description": "set MATERIAL"
},
"storage-temperature-from-c": {
"type": "number",
"description": "lower Celsius storage bound; left out, it is cleared"
},
"storage-temperature-to-c": {
"type": "number",
"description": "upper Celsius storage bound; left out, it is cleared"
}
},
"required": [
"material"
]
}
members_deactivateDeactivate a member
Input schema:
{
"type": "object",
"properties": {
"member_id": {
"type": "string",
"description": "deactivate MEMBER_ID"
}
},
"required": [
"member_id"
]
}
members_invite-batchInvite several people at once and print their invite links (managers only)
Invite several people at once (managers only). Pass a JSON array of {"email","role"} objects, role manager or member, as --rows or in --file (- reads stdin). Every row is invited or none is, and a refusal names the row. Each invitee sets their own PIN when they accept. Needs a signed-in session; an API token is refused with token_write_not_allowed.
Input schema:
{
"type": "object",
"properties": {
"file": {
"type": "string",
"description": "JSON file of rows, or - for stdin"
},
"rows": {
"type": "string",
"description": "the rows as a JSON array"
}
}
}
members_listList the lab's members (managers only)
Input schema:
{
"type": "object",
"properties": {}
}
members_reactivateReactivate a member
Input schema:
{
"type": "object",
"properties": {
"member_id": {
"type": "string",
"description": "reactivate MEMBER_ID"
}
},
"required": [
"member_id"
]
}
members_update-roleChange a member's effective role
Input schema:
{
"type": "object",
"properties": {
"member_id": {
"type": "string",
"description": "update-role MEMBER_ID"
},
"role": {
"type": "string",
"description": "member or manager"
}
},
"required": [
"member_id",
"role"
]
}
organizations_invitationsList the organizations that invited you List the organizations with an open invitation for your account's email that you have not joined yet. You accept one by signing in to that organization in a browser, from Account settings, Organizations; there is no command for it. The list is asked of the identity provider, so it is empty when none is configured, and provider_unavailable or provider_refused means it could not be asked. A signed-in session or an API token can list.
Input schema:
{
"type": "object",
"properties": {}
}
organizations_leaveLeave an organization (needs a signed-in session) Leave an organization and lose access to every lab it owns; labs you own yourself, even ones affiliated with it, are kept. Show the person the labs `organizations list` names for it and get their explicit confirmation first. --confirm is required. This needs a signed-in session; an API token is refused. The last owner cannot leave (last_owner), nor can the only manager of a lab the organization owns (last_manager: the refusal names those labs, and `organizations list` marks them). If the identity provider cannot remove the membership, nothing changes (provider_unavailable or provider_refused) and the leave can be retried.
Input schema:
{
"type": "object",
"properties": {
"confirm": {
"type": "boolean",
"description": "confirm leaving the organization"
},
"org_id": {
"type": "string",
"description": "leave ORG_ID"
}
},
"required": [
"org_id"
]
}
organizations_listList the organizations you belong to List every organization your account belongs to, with your role (owner or member) and the labs it owns that you can open. Belonging to an organization grants no lab access by itself; these labs are the access leaving it would remove. An organization with no lab is listed too. A signed-in session or an API token can list.
Input schema:
{
"type": "object",
"properties": {}
}
outflows_listList used-up stock
Input schema:
{
"type": "object",
"properties": {}
}
policy-acceptances_listList your recorded policy acceptances
Input schema:
{
"type": "object",
"properties": {}
}
reconciliation_claimClaim an unclaimed hold as yours Claims an open hold that names no one, such as a Benchsheet take recorded with no name or one whose PIN identified no one: what is still held is yours, and you reconcile it from then on. It names who holds it and moves no stock; it doesn't confirm possession or sign anything. The first claim wins, and it supersedes a manager's pending suggestion. Needs a signed-in session; an API token is refused. Claiming it again is safe.
Input schema:
{
"type": "object",
"properties": {
"checkout_id": {
"type": "string",
"description": "claim CHECKOUT_ID"
},
"id": {
"type": "string",
"description": "idempotency key; kept for older servers, and a claim is safe to resend without it (default: a new one)"
}
},
"required": [
"checkout_id"
]
}
reconciliation_correct-custodyCorrect who holds a hold, or the study it is for Changes who a hold is recorded as held by now, the study it is meant for, or both. Give --holder with --expected-holder, the member you believe holds it now, and a --reason unless the holder is you; a change of holder is kept in the history with the reason. Every study change is also logged, without a reason; older changes have no study entries. Give --study alone to change only the study, or --remove-study to remove it; they cannot be combined. What you leave out stays as it is, and nothing already recorded changes. The holder can be corrected until something is recorded as used, discarded, lost, split or made. The new holder still confirms possession themselves. Needs a signed-in session; an API token is refused. Resending the same correction is safe.
Input schema:
{
"type": "object",
"properties": {
"checkout_id": {
"type": "string",
"description": "correct-custody CHECKOUT_ID"
},
"expected-holder": {
"type": "string",
"description": "member id of the holder it has now; required with --holder"
},
"holder": {
"type": "string",
"description": "member id of the holder it should have"
},
"reason": {
"type": "string",
"description": "why another member is named, up to 500 characters"
},
"remove-study": {
"type": "boolean",
"description": "remove the hold's study; cannot be combined with --study"
},
"study": {
"type": "string",
"description": "study id it should have"
}
},
"required": [
"checkout_id"
]
}
reconciliation_listList open checkouts and recently resolved ones; a row with status resolved has already been reconciled Each row's person is the member holding the checkout (the holder). location includes its configured kind and, for Other, its custom kind label. quantity is how many were taken; held_quantity is how many are still held and not yet returned or settled. In JSON, statuses names every status that applies to the row for you, as reconciliation list --status accepts them, most pressing first, and is empty when none does; status is the one the server stores. Held split containers that read the same in every column (item, lot, location, holder, unit, held amount, status and signature requirement) collapse into one line with a count, as My stuff shows them; the line's checkout_ids lists every container, and its statuses every one any of them has. Pass --ungrouped for one line per checkout, each with its own statuses.
Input schema:
{
"type": "object",
"properties": {
"holder": {
"type": "string",
"description": "only the checkouts held by this member id (the row's person.id, a take's holder_id)"
},
"mine": {
"type": "boolean",
"description": "only the rows you hold, plus resolved rows whose required signature you still owe"
},
"status": {
"items": {
"type": "string",
"description": ""
},
"type": "array",
"description": "only rows with this status: overdue (held past the lab's overdue age, not yet stale), stale (an open hold the lab marks stale that still holds stock), sign (a signature you still owe), confirm (a take you still need to confirm as yours), unclaimed (an open hold with no person, which any member may claim: a take recorded with no name, or one whose PIN identified no one), held (an open hold none of the others applies to, whoever holds it; reconcile is accepted for it); a row is listed under every status that applies to it, so one that is both stale and unclaimed is under each, and is listed once when both are asked for; the STATUS column shows one and never shows sign or confirm, so a hold to confirm can read held there; repeat for any of several"
},
"ungrouped": {
"type": "boolean",
"description": "list every checkout on its own line instead of collapsing identical held split containers"
}
}
}
reconciliation_mineList reconciliation rows you hold, plus resolved rows whose required signature you still owe (same as list --mine) In JSON, statuses names every status that applies to the row for you, as reconciliation list --status accepts them, most pressing first, and is empty when none does; status is the one the server stores. Held split containers that read the same in every column (item, lot, location, holder, unit, held amount, status and signature requirement) collapse into one line with a count, as My stuff shows them; the line's checkout_ids lists every container, and its statuses every one any of them has. Pass --ungrouped for one line per checkout, each with its own statuses.
Input schema:
{
"type": "object",
"properties": {
"ungrouped": {
"type": "boolean",
"description": "list every checkout on its own line instead of collapsing identical held split containers"
}
}
}
reconciliation_preparation_abandonAbandon your unfinished form Abandons the draft id and saved time you read. A later save is newer work and is refused with preparation_changed. Retrying an abandoned or made draft is a no-op.
Input schema:
{
"type": "object",
"properties": {
"checkout_id": {
"type": "string",
"description": "abandon CHECKOUT_ID"
},
"id": {
"type": "string",
"description": "preparation id from save or list"
},
"kind": {
"type": "string",
"description": "preparation kind: split or made"
},
"saved-at": {
"type": "string",
"description": "saved_at value from save or list"
}
},
"required": [
"checkout_id",
"id",
"kind",
"saved-at"
]
}
reconciliation_preparation_listList your open preparations Lists unfinished forms while you are the active holder and a counted amount remains held. A custody change hides a draft without changing it. If the hold comes back to you, the draft is available again.
Input schema:
{
"type": "object",
"properties": {}
}
reconciliation_preparation_saveSave an unfinished Split or Made form
Input schema:
{
"type": "object",
"properties": {
"checkout_id": {
"type": "string",
"description": "save CHECKOUT_ID"
},
"kind": {
"type": "string",
"description": "preparation kind: split or made"
},
"payload": {
"type": "string",
"description": "version 1 JSON with required amount; split containers optional; made material_id, material_name, description, quantity and unit optional; input amount may be empty text"
},
"replaces": {
"type": "string",
"description": "saved_at of the draft you read; omit when no draft is known"
}
},
"required": [
"checkout_id",
"kind",
"payload"
]
}
reconciliation_reconcileSettle what you hold on a checkout as used, discarded or lost CHECKOUT_ID comes from `checkouts take` or `reconciliation list`. A pass may cover part of what is held and the rest stays held. Rerunning with the same `--id` records nothing new. Put stock back on the shelf with `checkouts return`; signing the resolved entry happens in the admin with fresh human authentication. A read-write API token may settle only its linked member's held remainder as used, discarded or lost.
Input schema:
{
"type": "object",
"properties": {
"checkout_id": {
"type": "string",
"description": "reconcile CHECKOUT_ID"
},
"content-outcome": {
"type": "string",
"description": "settle all held measured content as used, discarded or lost"
},
"content-reason": {
"type": "string",
"description": "what happened to held content when --content-outcome=lost"
},
"discarded": {
"type": "integer",
"description": "how many of what you hold were thrown out on purpose, such as contaminated or expired"
},
"id": {
"type": "string",
"description": "pass id (UUID); resend the same id to retry safely (default: a new one)"
},
"lost": {
"type": "integer",
"description": "how many of what you hold went missing: you don't know where they went"
},
"reason": {
"type": "string",
"description": "what happened to the lost ones; required with --lost"
},
"used": {
"type": "integer",
"description": "how many of what you hold were used up"
}
},
"required": [
"checkout_id"
]
}
reconciliation_showShow one reconciliation row and its history Prints one row of the reconciliation list and everything that happened on the hold, oldest first: how it began, each handover, return and outcome, and found stock after the close it was found against. A kiosk return names who the kiosk said brought it. A line nobody is named on reads Unclaimed. The row must be in the list: open, or resolved within the list's window.
Input schema:
{
"type": "object",
"properties": {
"checkout_id": {
"type": "string",
"description": "show CHECKOUT_ID"
}
},
"required": [
"checkout_id"
]
}
reconciliation_splitSplit held stock into new containers Split a held allocation into containers. --containers is a comma-separated list of positive sizes. --kind names the counted noun for new containers. With the checkout's noun, --rest may keep or discard any remainder; a different kind consumes the whole allocation and cannot have a remainder. This needs a signed-in session; an API token is refused with token_write_not_allowed.
Input schema:
{
"type": "object",
"properties": {
"checkout_id": {
"type": "string",
"description": "split CHECKOUT_ID"
},
"containers": {
"type": "string",
"description": "comma-separated positive sizes of the new containers"
},
"id": {
"type": "string",
"description": "pass id (UUID); resend the same id to retry safely (default: a new one)"
},
"kind": {
"type": "string",
"description": "counted noun for the new containers"
},
"preparation": {
"type": "string",
"description": "draft id to complete; give with --preparation-saved-at"
},
"preparation-saved-at": {
"type": "string",
"description": "saved_at of that draft; give with --preparation"
},
"quantity": {
"type": "integer",
"description": "how many held units to allocate to the split"
},
"rest": {
"type": "string",
"description": "same-noun remainder: keep or discard"
}
},
"required": [
"checkout_id",
"containers",
"kind",
"quantity"
]
}
reconciliation_stale_closeClose stale held checkouts Closes one or more stale checkouts: counted containers are presumed consumed and measured content is lost as stale. This manager-only action is atomic: if any checkout is not stale, none are closed. Resend the same --id to retry safely.
Input schema:
{
"type": "object",
"properties": {
"checkout_id": {
"items": {
"type": "string",
"description": ""
},
"type": "array",
"description": "close CHECKOUT_ID..."
},
"id": {
"type": "string",
"description": "operation id (UUID); resend the same id to retry safely (default: a new one)"
}
},
"required": [
"checkout_id"
]
}
reconciliation_stale_listList held checkouts past this lab's stale-hold threshold
Input schema:
{
"type": "object",
"properties": {}
}
reconciliation_transferTransfer a held amount to a member Moves a counted portion of your open hold to another member. Needs a signed-in session; API tokens are refused.
Input schema:
{
"type": "object",
"properties": {
"held_entry_id": {
"type": "string",
"description": "transfer HELD_ENTRY_ID"
},
"id": {
"type": "string",
"description": "idempotency key (UUID); resend the same id to retry safely"
},
"quantity": {
"type": "integer",
"description": "counted quantity to transfer"
},
"recipient": {
"type": "string",
"description": "recipient member id"
}
},
"required": [
"held_entry_id",
"quantity",
"recipient"
]
}
reports_expiryList expired stock and stock expiring within a window
Input schema:
{
"type": "object",
"properties": {
"window": {
"type": "string",
"description": "expired, 30, 60 or 90 (days ahead, inclusive; always includes expired)"
}
},
"required": [
"window"
]
}
reports_holdingsList held stock, one row per holder
Input schema:
{
"type": "object",
"properties": {}
}
reports_low-stockList every stock row of each material that is low or out on its stock pooled across lots
Input schema:
{
"type": "object",
"properties": {}
}
setup_finishFinish setup; starts the lab's 30-day trial if it has none
Input schema:
{
"type": "object",
"properties": {}
}
setup_statusShow whether initial setup steps are complete
Input schema:
{
"type": "object",
"properties": {}
}
shipments_showShow a shipment and each of its lots still waiting to be put away
Input schema:
{
"type": "object",
"properties": {
"shipment_id": {
"type": "string",
"description": "show SHIPMENT_ID"
}
},
"required": [
"shipment_id"
]
}
shipments_waitingList shipments with stock waiting to be put away, oldest first
Input schema:
{
"type": "object",
"properties": {}
}
studies_createAdd a study Add a study with a signed-in session or read-write API token.
Input schema:
{
"type": "object",
"properties": {
"client": {
"type": "string",
"description": "client"
},
"code": {
"type": "string",
"description": "optional vanity study code, e.g. \"ONC-114\""
},
"description": {
"type": "string",
"description": "description"
},
"id": {
"type": "string",
"description": "optional study UUID; default is a new UUID minted per run and reused on retries, so a retry never creates two studies"
},
"name": {
"type": "string",
"description": "study name"
}
},
"required": [
"name"
]
}
studies_listList active and retired studies
Input schema:
{
"type": "object",
"properties": {}
}
studies_renameRename a study
Input schema:
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "study UUID"
},
"name": {
"type": "string",
"description": "study name"
}
},
"required": [
"id",
"name"
]
}
studies_reportRead a study's report: what was used, made, held and signed for it, and its changes
Input schema:
{
"type": "object",
"properties": {
"study_id": {
"type": "string",
"description": "report STUDY_ID"
}
},
"required": [
"study_id"
]
}
studies_restoreRestore a retired study
Input schema:
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "study UUID"
}
},
"required": [
"id"
]
}
studies_retireRetire a study
Input schema:
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "study UUID"
}
},
"required": [
"id"
]
}
studies_showShow bounded study details
Input schema:
{
"type": "object",
"properties": {
"study_id": {
"type": "string",
"description": "show STUDY_ID"
}
},
"required": [
"study_id"
]
}
studies_updateUpdate a study's details
Input schema:
{
"type": "object",
"properties": {
"client": {
"type": "string",
"description": "client"
},
"description": {
"type": "string",
"description": "description"
},
"id": {
"type": "string",
"description": "study UUID"
},
"name": {
"type": "string",
"description": "study name"
}
},
"required": [
"id",
"name"
]
}
tokens_listList your API tokens, newest first List the signed-in account's newest 100 API tokens, with scope, creation, last use, expiry and revocation. The token value is never shown. Needs a signed-in session (labbench login); an API token cannot list tokens, and the command says so without sending a request.
Input schema:
{
"type": "object",
"properties": {}
}
tokens_revokeRevoke one of your API tokens (needs a signed-in session) Revoke one of the signed-in account's API tokens; it stops working at once and cannot be restored. `tokens list` shows the ids. Another account's token, or an unknown id, is refused with token_not_found. --confirm is required. Needs a signed-in session (labbench login); an API token cannot revoke tokens, and the command says so without sending a request.
Input schema:
{
"type": "object",
"properties": {
"confirm": {
"type": "boolean",
"description": "confirm revoking the token"
},
"token_id": {
"type": "string",
"description": "revoke TOKEN_ID"
}
},
"required": [
"token_id"
]
}
whoamiShow the signed-in account, its lab and role
Input schema:
{
"type": "object",
"properties": {}
}