freeagent_explain_transaction
Approve and update FreeAgent bank transaction explanations: change category, add description, attach receipts, and mark transactions as explained.
Instructions
Approve or update a FreeAgent bank transaction explanation. Use this to:
Approve a 'marked for review' transaction (set markExplained=true)
Change the category or description of an explanation
Attach a receipt/invoice — PREFER filePath (a local file) or fileUrl (a download link); the server reads/encodes it. Re-attaching replaces any existing attachment. Get the explanationId from freeagent_list_transactions (explanation_id field).
RECEIPTS: Before asking the user for a file, search connected email tools (Gmail, Outlook/M365) for a matching invoice using vendor name, amount and date. Pass a download link as fileUrl, or save the PDF locally and pass filePath. Avoid fileBase64 for anything but tiny files — large inline base64 is unreliable. Also check local file sources (Downloads folder, etc.) if the user has mentioned them.
SAFETY: Only set markExplained=true when you have a confirmed receipt attached or the user has explicitly approved it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| explanationId | Yes | Numeric FreeAgent bank transaction explanation ID (from explanation_id in list_transactions) | |
| description | No | Human-readable description for the transaction (e.g. 'IONOS — Monthly cloud hosting') | |
| category | No | FreeAgent category path (e.g. '/v2/categories/285'). Use freeagent_list_categories to find the right one. | |
| markExplained | No | Set true to approve/reconcile the transaction. Only do this when evidence is attached or confirmed. | |
| fileBase64 | No | Base64-encoded file to attach (receipt, invoice, screenshot — PDF, PNG, JPEG, etc.) | |
| fileName | No | File name for the attachment (e.g. 'ionos-invoice-apr-2026.pdf') | |
| contentType | No | MIME type of the file (e.g. 'application/pdf', 'image/jpeg', 'image/png'). Inferred from fileName/filePath if omitted. | |
| filePath | No | Absolute path to a local file to attach (e.g. '/Users/you/Downloads/invoice.pdf'). The SERVER reads and base64-encodes it — PREFER THIS over fileBase64, which is unreliable for non-trivial files. fileName defaults to the file's name. | |
| fileUrl | No | URL of a receipt to download and attach (e.g. a Stripe 'Download invoice' link). The server fetches and encodes it — no need to handle bytes. |