Relay MCP tools
Registered when the server starts with RELAY_API_URL set. 35 tools, listed with the description the server sends in tools/list.
| Tool | Description |
|---|---|
relay_ack_shortfall |
Close one counted difference, with a reason. Admin only. The row is never deleted — ‘we found them’ and ‘we wrote them off’ are both history. |
relay_add_client |
Add a client. Admin only. |
relay_add_workshop |
Add an external workshop. Prices are in cents: flat_cents is charged once per order, unit_cents per unit — the two exist because a workshop often charges one of each for different services. Admin only. |
relay_advance_order |
Hand an order over: fill in this stage’s form and move it to the next stage that applies to it. On a counting stage ‘quantity’ is REQUIRED, and a count lower than the order’s current one records a difference against this leg — it never blocks the move. A claim-kind stage must be claimed first. |
relay_apply_process |
Replace a workspace’s whole process with the stage list given. Stages are diffed by key: a new key is added, an existing key is updated in place (keeping its history), and a key you leave out is retired. Retiring a stage that still holds open orders is REFUSED with a count — move those orders first. Admin only. Confirm the stage table with the owner before calling this. |
relay_catalogue |
List what Relay can do: the stage types available to build a process from (with their kind, whether they count units and whether they pay piecework), the roles the workspace’s process already uses, the conditions a stage can be made conditional on, and the report names. Read this BEFORE proposing a process — stage types and conditions are closed sets and a value outside them is refused. Roles are NOT a closed set: a role is whatever the company calls the people who do a step, and naming one on a stage is what creates it. |
relay_claim_order |
Take an order at a claim-kind stage: the first of the two taps, the one that means ‘I am going’. Everyone else then sees it is taken. The second tap is relay_advance_order. |
relay_create_order |
Publish a new work order into the first stage of the process. Owners and admins, or a member holding the first stage’s role (409 wrong_tag otherwise). Everyone carrying that stage’s tag is notified, so this is what stops two people driving to the same collection. |
relay_define_order |
Say what has to be done to a lot and what it is worth: a wash recipe and a set of priced tasks from the rate cards. The quote is fixed at TODAY’s prices and copied onto the order, so a later price change never rewrites what was agreed. |
relay_draft_invoice |
Assemble the bill for a lot WITHOUT recording anything: the service, each task quoted at definition, and the external workshop’s presilla and ojal, plus the workspace’s tax rates. Owners and admins only (403 admin_required). |
relay_drop_work |
Release an unfinished share back to the pool so someone else can take it. Finished work cannot be dropped. |
relay_finish_work |
Mark one share done. Only finished work is paid, and a paying stage will not release the lot until every task on it is fully taken AND finished. |
relay_get_billing |
The workspace’s billing numbers: what the main service costs per unit, and the tax rates in basis points (1900 = 19%). All zero means nothing has been set, and an invoice then has no tax lines. |
relay_get_order |
Read one work order with its FULL hand-over log — who moved it, when, how many, and what they observed — plus any counted differences against it. |
relay_get_process |
Read a workspace’s production process: the ordered stages a work order passes through, each with its type, the role that may act on it (in the company’s own words), an optional SLA in days, and an optional condition that makes it apply to some orders only. A 404 process_missing means the workspace has not been set up yet — call relay_catalogue and relay_apply_process. |
relay_inventory_read |
Read Relay’s material mappings and durable Inventory deduction status. Operations: list_materials (fresh targets; optional view=config for admin configuration inspection during outages); list_inventory_issues (optional order_id, after). Never send Inventory credentials. |
relay_inventory_write |
Change Relay’s material mappings or retry an Inventory deduction. Operations: save_material (admin, name/item_id/location_id plus optional existing id/archived); retry_inventory_issue (admin, id). Never send Inventory credentials. Retry does not alter the immutable deduction or its principal. |
relay_list_assignments |
Who has taken what on a lot, how much of it, and what each share is worth. A non-admin sees only their own share’s value; everyone’s units stay visible. |
relay_list_batches |
The machine runs recorded against a lot, with what was poured into each. |
relay_list_clients |
List the clients work is done for. |
relay_list_members |
List the workspace’s people with the roles they hold — which stages each of them may act on — and whether they have linked a chat for alerts. |
relay_list_orders |
List work orders. Open orders by default, newest first. Each carries its number, client, current stage, live count and — on a stage with an SLA — a traffic light (ok / warn / late) for how long it has been sitting there. |
relay_list_rate_cards |
List the priced tasks that can be put on an order. Only live cards: a retired price is kept forever so an old quote can still be explained, but it is never offered again. |
relay_list_shortfalls |
List counted differences: where fewer units arrived than were handed over. Open ones by default, each with the order, the client and the LEG it happened on — which is what turns ‘stock goes missing’ into a place to look. |
relay_list_workshops |
List the external workshops work is sent out to. They have no user accounts — the people who hand in and collect record everything. |
relay_mark_invoiced |
Record the invoice number the accountant issued against a lot. Admin only. It does not move the lot — reaching the last stage is what closes it. |
relay_note_order |
Record an observation against an order without moving it — how ‘the workshop called to say it is ready’ gets on the record. |
relay_record_batch |
File one machine run against a lot: which machine, how many units, the weights, the temperature and time, and what was poured. It does NOT move the lot — several loads make one stage. The kind is taken from the stage, so a dryer sheet cannot be filed against the washer. |
relay_recount_order |
Set an order’s count by hand, with a reason. Admin only. It does NOT erase the difference it corrects: both numbers stay in the log, because the register is what a client is shown. |
relay_report |
Run one report over a date window. Names: by-day, by-actor, by-actor-stage (per person, stage and day — a driver’s pickups apart from drop-offs), by-stage, by-workshop, shortfalls-by-client, stage-durations, payroll (owners and admins only). Every one reads the hand-over log directly, so nothing can disagree with the board. |
relay_set_billing |
Set the workspace’s billing numbers. Rates are BASIS POINTS, not percentages: 19% is 1900. Admin only. Ask for the real figures — never guess a tax rate. |
relay_set_member_tags |
Set the roles a person holds, which decides the stages they may act on. Replaces their whole list. A role must be one the process’s stages carry (relay_catalogue lists them). Admin only. |
relay_set_order_photo |
Pin the reference sample photo on an order, so the people doing the manual work can see what they are copying. One photo per order; a new one replaces the old. Takes a workspace Drive file id. |
relay_set_rate |
Set the price of a task. This RETIRES the live card and inserts a new one, so every quote already agreed keeps the price it was agreed at. Admin only. |
relay_take_work |
Take a share of a task on a lot, so it can be worked and paid for. Omit worker_id to take it yourself; naming somebody else is a supervisor’s act and needs admin. A big lot is SPLIT by taking it twice for two people, and the shares may not exceed the lot. The price is fixed at what the lot was quoted, not at today’s rate. |
relay_update_client |
Change a client’s details. Only the fields given change. service_unit_cents sets what this client pays per unit for the main service on invoices drafted from now on (0 = the workspace price). Admin only. |