Tool list
Every tool sets all four MCP annotations, so clients know how careful to be:
- Read-only:
readOnlyHint: true. Safe to call any number of times. - Write: changes only things nobody outside your account sees. Drafts have no number and send nothing.
- Destructive:
destructiveHint: true. Can’t be undone. - Confirms: the server itself asks first. See Confirmations.
send_invoice has openWorldHint: true, because it emails someone outside Invoice-AI.
Each tool checks its own scope, so a connection with only read scopes can still use the read tools. A call without the scope fails with a message that names the missing scope.
What a tool returns
Each result has two copies of the same answer:structuredContent: the exact JSON the REST endpoint returns.- A text block: a one-line summary, then that JSON, introduced as data entered by people, not instructions.
isError: true and a message the assistant can act on.
Confirmations
finalize_invoice, send_invoice, mark_invoice_paid and void_invoice can’t be undone, so each one takes two calls.
1
Call without a token
Nothing changes. The tool returns a preview and a
confirmation_token:Result (structuredContent)
action is finalize, send, pay or void. warnings flags anything the user should notice, for example a recipient that isn’t the customer’s email on file, or a draft that will be numbered first.2
Show the preview and wait for a yes
The assistant shows the preview to the user. If they say no, it stops.
3
Call again with the token
{ "data": Invoice, "emailed_to": "[email protected]" }.- A token expires after 10 minutes.
- A token is bound to the action, the invoice, the connection, and the exact state of the invoice and the arguments: status, total, currency, customer, line count, last update, and the recipient, payment date or void reason. If any of these changed since the preview, the call fails. Call again without a token for a fresh preview.
- Retrying a confirmed call with the same token replays the first result. It doesn’t email or act twice.
- So “send it again” needs a new preview and a new yes. An old token only replays the old send.
- If there’s nothing to do (the invoice is already finalized, paid or void), the tool says so and changes nothing.
Money and ids
- Amounts are integers in the minor unit of the invoice currency:
150000is $1,500.00 in USD. Currencies without a minor unit, such as JPY, use whole units. unit_amountis before tax. Tax is a per-linetax_ratepercent.- If no currency is given, a draft uses your business currency from
get_business_profile. - Ids have prefixes:
cus_customers,in_invoices,prod_products,price_prices. A line can use aprice_id instead of a description and amount.