Tejas help

Help / Developers

MCP

The same operations as tools, for AI agents. Each tool is named for who acts.

The MCP tools run the same code as the REST API. A tool and its route check the same role, replay the same answers and return the same JSON. Use the same API key and scopes. See Authentication.

Each tool needs the scope its route needs. Reads of orders need orders:read and changes need orders:write; the customer tools need buyers:read, buyers:write and catalog:read. See Authentication.

Who acts is in the name #

A tool's name says who acts. You never choose that with an argument.

  • transactions_confirm, transactions_reject, transactions_pack, transactions_fulfil, transactions_accept, transactions_refuse, transactions_mark_paid, transactions_not_received, transactions_refund and transactions_edit are the seller's decisions.
  • transactions_buyer_* tools are a customer's own moves, made for them. They need a buyer_id.

Every change takes an idempotency key #

Every tool that changes something needs an idempotency_key. A repeated call with the same key gets the first answer and changes nothing. Onboarding a customer is the one exception, because the phone number already makes it safe to repeat. See Idempotency.

The tools #

Read

ToolWhat it does
transactions_listThe seller's transactions, newest first. Takes state, limit and offset.
transactions_getOne transaction.
transactions_eventsA transaction's history, oldest first.
transactions_find_buyerFinds a customer by external_ref or phone. Returns the buyer_id the customer tools take.
transactions_browseWhat the shop offers, as the customer sees it. Use it before setting a cart.
transactions_buyer_statusA customer's transaction, or their latest, with their recent ones.
transactions_linkThe shop's entry link.
transactions_buyer_linkA link to send a customer.
transactions_settingsThe approval settings.
transactions_fee_invoicesTejas's monthly fee invoices.

Act for a customer

ToolWhat it does
transactions_add_buyerAdds a customer as the shop's own. Does not message them.
transactions_buyer_set_linesReplaces the lines of the customer's cart.
transactions_buyer_placePlaces the cart.
transactions_buyer_editEdits one of the customer's transactions.
transactions_buyer_cancelCancels one of the customer's transactions. Cancelling a confirmed one asks first.

Decide as the seller

transactions_confirm, transactions_reject, transactions_pack, transactions_fulfil, transactions_accept, transactions_refuse, transactions_mark_paid, transactions_not_received, transactions_refund and transactions_edit. The arguments are the same as the REST bodies: transaction_id, version, reason, confirmed, amount and lines.

A good flow for an agent #

  1. Call transactions_find_buyer, or transactions_add_buyer for a new customer.
  2. Call transactions_browse and show the person what is there.
  3. Call transactions_buyer_set_lines. Show the person the lines and the total.
  4. When the person agrees, call transactions_buyer_place.

If a price moved, the cart answer says so with a price_changed problem. Show the new total and ask again before you place.

Did this page help?

Last checked: 2026-11-07