API reference | LabBench CLI reference | MCP reference | Guide: set up a lab

LabBench MCP server

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.

Register the server

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_..."
      }
    }
  }
}

Tools

billing_history

List 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_show

Show the lab's subscription status, plan and renewal

Input schema:

{
  "type": "object",
  "properties": {}
}

categories_add

Add 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_list

List 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_remove

Remove 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_update

Rename 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_return

Return 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_take

Take 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_clear

Take 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_set

File 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_list

List 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_set

Set 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_clear

Take 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_set

Put 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-article

Mark 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_identify

Ask 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_list

List active kiosks

Input schema:

{
  "type": "object",
  "properties": {}
}

kiosks_pairing-codes_confirm

Confirm 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_create

Issue a pairing code to enter on the tablet

Input schema:

{
  "type": "object",
  "properties": {}
}

kiosks_pairing-codes_list

List outstanding pairing codes and the tablets that claimed them

Input schema:

{
  "type": "object",
  "properties": {}
}

kiosks_rejections

List rejected Benchsheet actions

Input schema:

{
  "type": "object",
  "properties": {}
}

kiosks_set-first-location

Set 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_unpair

Unpair 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_create

Declare 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_get

Show the selected lab's details

Input schema:

{
  "type": "object",
  "properties": {}
}

lab_list

List every lab your account belongs to

Input schema:

{
  "type": "object",
  "properties": {}
}

lab_settings_get

Read lab settings

Input schema:

{
  "type": "object",
  "properties": {}
}

lab_settings_pin-verification

Set 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-signatures

Set whether records need signatures

Input schema:

{
  "type": "object",
  "properties": {
    "required": {
      "type": "boolean",
      "description": "whether records need signatures"
    }
  },
  "required": [
    "required"
  ]
}

lab_settings_set-stale-hold-days

Set 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-zone

Set the lab time zone

Input schema:

{
  "type": "object",
  "properties": {
    "iana_name": {
      "type": "string",
      "description": "set-time-zone IANA_NAME"
    }
  },
  "required": [
    "iana_name"
  ]
}

lab_update

Update 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_create

Add 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-batch

Add 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_list

List the lab's locations

Input schema:

{
  "type": "object",
  "properties": {}
}

locations_removed

List removed locations and who removed them (managers only)

Input schema:

{
  "type": "object",
  "properties": {}
}

locations_restore

Restore a removed location (managers only)

Input schema:

{
  "type": "object",
  "properties": {
    "location_id": {
      "type": "string",
      "description": "restore LOCATION_ID"
    }
  },
  "required": [
    "location_id"
  ]
}

locations_shelves_create

Add 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_list

List a location's configured shelves

Input schema:

{
  "type": "object",
  "properties": {
    "location_id": {
      "type": "string",
      "description": "list LOCATION_ID"
    }
  },
  "required": [
    "location_id"
  ]
}

locations_shelves_rename

Rename 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_reorder

Replace 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_retire

Retire 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_stock

Show 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_update

Update 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_export

Export 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_list

List 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_discard

Discard all shelf stock of an expired lot

Input schema:

{
  "type": "object",
  "properties": {
    "lot_id": {
      "type": "string",
      "description": "discard LOT_ID"
    }
  },
  "required": [
    "lot_id"
  ]
}

lots_edit

Correct 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_import

Import 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-away

Put 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_receive

Receive 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-shipment

Receive 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_show

Show 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_units

List the lab's counted units and unused common units

Input schema:

{
  "type": "object",
  "properties": {}
}

lots_waiting

List received lots waiting to be put away

Input schema:

{
  "type": "object",
  "properties": {}
}

materials_category_clear

Take 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_set

File 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_list

List 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_set

Set 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_show

Show 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_set

Replace 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_deactivate

Deactivate a member

Input schema:

{
  "type": "object",
  "properties": {
    "member_id": {
      "type": "string",
      "description": "deactivate MEMBER_ID"
    }
  },
  "required": [
    "member_id"
  ]
}

members_invite-batch

Invite 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_list

List the lab's members (managers only)

Input schema:

{
  "type": "object",
  "properties": {}
}

members_reactivate

Reactivate a member

Input schema:

{
  "type": "object",
  "properties": {
    "member_id": {
      "type": "string",
      "description": "reactivate MEMBER_ID"
    }
  },
  "required": [
    "member_id"
  ]
}

members_update-role

Change 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_invitations

List 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_leave

Leave 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_list

List 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_list

List used-up stock

Input schema:

{
  "type": "object",
  "properties": {}
}

policy-acceptances_list

List your recorded policy acceptances

Input schema:

{
  "type": "object",
  "properties": {}
}

reconciliation_claim

Claim 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-custody

Correct 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_list

List 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_mine

List 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_abandon

Abandon 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_list

List 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_save

Save 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_reconcile

Settle 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_show

Show 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_split

Split 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_close

Close 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_list

List held checkouts past this lab's stale-hold threshold

Input schema:

{
  "type": "object",
  "properties": {}
}

reconciliation_transfer

Transfer 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_expiry

List 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_holdings

List held stock, one row per holder

Input schema:

{
  "type": "object",
  "properties": {}
}

reports_low-stock

List every stock row of each material that is low or out on its stock pooled across lots

Input schema:

{
  "type": "object",
  "properties": {}
}

setup_finish

Finish setup; starts the lab's 30-day trial if it has none

Input schema:

{
  "type": "object",
  "properties": {}
}

setup_status

Show whether initial setup steps are complete

Input schema:

{
  "type": "object",
  "properties": {}
}

shipments_show

Show 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_waiting

List shipments with stock waiting to be put away, oldest first

Input schema:

{
  "type": "object",
  "properties": {}
}

studies_create

Add 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_list

List active and retired studies

Input schema:

{
  "type": "object",
  "properties": {}
}

studies_rename

Rename a study

Input schema:

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "study UUID"
    },
    "name": {
      "type": "string",
      "description": "study name"
    }
  },
  "required": [
    "id",
    "name"
  ]
}

studies_report

Read 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_restore

Restore a retired study

Input schema:

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "study UUID"
    }
  },
  "required": [
    "id"
  ]
}

studies_retire

Retire a study

Input schema:

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "study UUID"
    }
  },
  "required": [
    "id"
  ]
}

studies_show

Show bounded study details

Input schema:

{
  "type": "object",
  "properties": {
    "study_id": {
      "type": "string",
      "description": "show STUDY_ID"
    }
  },
  "required": [
    "study_id"
  ]
}

studies_update

Update 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_list

List 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_revoke

Revoke 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"
  ]
}

whoami

Show the signed-in account, its lab and role

Input schema:

{
  "type": "object",
  "properties": {}
}