Create expense
crunch_create_expenseRecord an expense in Crunch accounting with supplier, date, line items, optional payment and receipt; validate reference values and refuse duplicates unless allowed.
Instructions
Record an expense: who it was from, the date, one or more lines (expense type, VAT type, gross amount), and optionally how it was paid and the receipt. Look up valid values first: crunch_list_expense_types, crunch_list_vat_types, crunch_list_payment_methods, crunch_list_bank_accounts. The date must be in an open accounting period. Refuses an expense that matches an existing one (same supplier, date, gross amount and supplier reference) unless allow_duplicate=true.
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": {
"line_items": "<line_items>",
"posting_date": "<posting_date>"
},
"name": "crunch_create_expense"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Internal note | |
| extra | No | Additional raw ExpenseDto fields, using Crunch's own field names (advanced). Merged last. | |
| dry_run | No | Preview: return the request that would be sent (for an update, the fields that would change) without sending it | |
| payments | No | How it was paid; leave out to record it as unpaid | |
| line_items | Yes | One or more lines, each with its own expense type, VAT type and amount | |
| attachments | No | Receipts or invoices to attach | |
| supplier_id | No | Supplier ID (see crunch_list_suppliers). Give this or supplier_name. | |
| posting_date | Yes | Date of the expense or receipt (YYYY-MM-DD); must be in an open accounting period | |
| supplier_name | No | Instead of supplier_id: the supplier's exact name | |
| allow_duplicate | No | Create the expense even if one with the same supplier, date, gross amount and supplier reference already exists (default false: refuse, and name the existing expense) | |
| create_supplier | No | With supplier_name: create the supplier if it doesn't exist yet (default false) | |
| supplier_reference | No | The supplier's invoice or receipt number |