Import ATO statement
import_ato_statementImports an ATO Online statement CSV or JSON into the correct ATO account, matches already imported lines, and reconciles balances against ATO records.
Instructions
Import an ATO account statement from the ATO Online services portal's Transactions page: the CSV its Download button saves, or the JSON the page returns (TransactionStatements: response.transactionDetail[]). Pass file_path to the saved .csv or .json file, or the text itself as statement_json. Prefer the JSON when the user has it: it links GIC remissions to their charges, so the 30 June position is exact (a position built from the CSV says when it isn't). Idempotent — lines already imported are matched, and a JSON import upgrades lines first imported from the CSV, so re-importing an overlapping range adds nothing. Afterwards Alpha checks its running balance against the ATO's on every line (reconciled: false names the first line that differs) and proposes bank rows for ATO payments and refunds (confirm them with match_ato_payment). A statement for a different ATO account is refused, by its header or, when the CSV has no title lines, by what its lines say (activity statement lines can't go into the income tax account, or income tax lines into the activity statement account); the error names the account it looks like. Imported into the wrong account? Use undo_ato_import.
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": {
"fund_id": "<fund_id>",
"ato_account_id": "<ato_account_id>"
},
"name": "import_ato_statement"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fund_id | Yes | Fund ID (discover via whoami or list_funds) | |
| file_path | No | Absolute path to the saved Download .csv or TransactionStatements .json file | |
| reasoning | No | Why you are making this change — recorded on the audit log entry for this write | |
| external_ref | No | Your stable ID for this write (e.g. a statement line or document reference). Repeating a call with the same external_ref replays the first result instead of writing twice. | |
| ato_account_id | Yes | ATO account ID (find via list_ato_accounts) | |
| statement_json | No | The statement's text — the JSON or the Download CSV (instead of file_path) |