freeagent_create_expense
Create expenses for personal card or cash purchases needing reimbursement. Supply vendor, date, amount, and description; optionally include a receipt or link to a bank transaction.
Instructions
Create an expense in FreeAgent — for purchases on a personal card or cash that need claiming back. Provide vendor, date, amount, description and category. If categoryUrl is omitted, auto-selects from vendor mapping. Optionally pass bankAccountId to auto-match and explain a corresponding bank transaction (e.g. if the same purchase also appears on a company card).
RECEIPTS: Before asking the user for a file, search connected email tools (Gmail, Outlook/M365) for a matching invoice. Use vendor name, amount and date as search terms. Download the PDF and pass it as fileBase64 + fileName. Also check local sources (Downloads folder, etc.) if the user has mentioned them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vendor | Yes | Vendor / merchant name (e.g. 'IONOS Cloud') | |
| datedOn | Yes | Expense date YYYY-MM-DD | |
| grossAmount | Yes | Gross amount as string (e.g. '22.80') | |
| description | Yes | Expense description (e.g. 'Monthly cloud hosting') | |
| currency | No | ISO 4217 currency code (default GBP) | GBP |
| vatAmount | No | VAT amount as string (e.g. '3.80') | |
| categoryUrl | No | FreeAgent category URL (e.g. '/v2/categories/285'). Auto-selected from vendor if omitted. | |
| fileBase64 | No | Base64-encoded receipt file (PDF, PNG, JPEG, etc.) | |
| fileName | No | File name for the receipt (e.g. 'receipt.pdf') | |
| contentType | No | MIME type (e.g. 'application/pdf'). Inferred from fileName if omitted. | |
| bankAccountId | No | If supplied, search this bank account for a matching unexplained transaction (same amount, date ±4 days) and link the expense to it. |