Export report
export_reportSave a report to the business's Files as a PDF or a CSV, drawn from the same numbers the app shows: profit-and-loss, cash-flow or a statement for start to end, balance-sheet, trial-balance or overdue-invoices (what each customer owes by age, as stub-web's Overdue Invoices shows it) as at end, bank-transactions (one account with bankaccountid, else all) for start to end, or the chart-of-accounts (no dates). Answers the new file's id and name: cite it as a file tag so the user can open and download it. Each call saves a new copy, so call it once per request. The file is kept, not imported into the books. A missing or another business's contact is refused with reason report-contact-not-found.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"report": "<report>",
"format": "<format>"
},
"name": "export_report"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | statement only: the customer's or supplier's id, from list_clients or list_suppliers. | |
| end | No | Last day, YYYY-MM-DD; the as-at date for balance-sheet, trial-balance and overdue-invoices. Needed for all but chart-of-accounts. | |
| kind | No | statement only: customer or supplier. | |
| start | No | First day, YYYY-MM-DD. Needed for profit-and-loss, cash-flow, statement and bank-transactions. | |
| format | Yes | pdf or csv. A csv opens in Excel or Google Sheets. | |
| report | Yes | profit-and-loss, balance-sheet, trial-balance, cash-flow, chart-of-accounts, statement (one customer's or supplier's account), overdue-invoices (each customer's overdue money by age; aged-debtors still works) or bank-transactions. | |
| bankaccountid | No | bank-transactions only: one bank account's id, from list_bank_accounts. Omit for every account. |