Update documents
update_documentsChange the due date on many documents in one call: every document a filter matches (the list_documents filters, and/or ids), up to 250. Use this, never save_document one by one, when the user asks to change due dates on several documents. Send duedate for a fixed date, or due_days for each document's own date plus N days. Call with dry_run=true first, tell the user how many documents would change, and apply once they confirm. Partial success: returns updated, skipped (already due on that date) and errors.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "update_documents"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Only documents with a due date on/before this date (inclusive, ISO 8601; e.g. today to isolate bills due by now). Documents with no due date are kept. | |
| ids | No | Only these document ids (up to 250). Combine with the filters to narrow further. | |
| from | No | Only documents with a due date on/after this date (inclusive, ISO 8601, e.g. "2026-01-01"). Documents with no due date are kept. | |
| type | No | The kind of document. One of: invoice — Bill a customer for goods or services. Money in.; quote — A pre-sale estimate for a customer; becomes money in once accepted.; recurring — An invoice that repeats on a schedule. Money in.; debit_note — Reduce what you owe a supplier (offsets a bill). Money in.; credit_note — Refund or reduce a customer's invoice. Money out.; purchase_order — Order goods or services from a supplier. Money out.; bill — A supplier's bill that you owe. Money out.; grn — Record stock received against a purchase order. Money out.. | |
| query | No | Case-insensitive substring match over the document's text (reference/number, name, notes, purchase order, contact and line items). Combine with type to jump straight to one document by its reference number, e.g. type=bill, query="4B66E86E-0286". | |
| status | No | Filter to documents whose computed status matches (case-insensitive), e.g. "overdue", "due", "paid", "partiallypaid", "sent", "draft". Combine with type=bill for overdue-bill analysis. | |
| unpaid | No | When true, return only documents with an outstanding balance (excludes fully paid / zero-outstanding rows). | |
| contact | No | Filter to documents for this contact id (a client or supplier). | |
| dry_run | No | When true, change nothing: return how many documents would change and which. Call with dry_run first, tell the user the count, and apply once they confirm. | |
| duedate | No | Set every matched document's due date to this date (ISO 8601, e.g. "2026-11-30"). Send this or due_days. | |
| currency | No | Filter to documents in this currency (ISO 4217 code, e.g. "USD", "ZAR"). Documents with no stored currency are excluded when set. | |
| due_days | No | Set each matched document's due date to its own document date plus this many days, e.g. 30. Send this or duedate. | |
| direction | No | Money direction filter: "in" for sales documents (invoices, quotes, debit notes), "out" for purchase documents (bills, POs, credit notes, GRNs). | |
| repeating | No | When true, return only the documents whose repeat schedule is on: each live series' template. Generated copies and stopped series are left out. Pass a row's id to set_recurring_invoice to stop or change that series. | |
| min_outstanding | No | Only documents whose outstanding balance is at least this amount (inclusive). |