Record an expense
record_expenseRecord one expense or income entry in a ledger. Commits immediately. amount_cents is MINOR units (cents): pass 2500 for 25.00, never a decimal. The returned amount is in currency units (e.g. "25.00"). To attribute the source of money, pass expense_account_id (the numeric id from list_expense_accounts) — do NOT stuff the account into description, and do NOT pass a name. When omitted, the ledger's default account (if any) is applied.
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": {
"ledger_id": "<ledger_id>",
"category": "<category>",
"amount_cents": "<amount_cents>"
},
"name": "record_expense"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | Entry date as ISO YYYY-MM-DD. Defaults to today if omitted; resolve relative dates yourself. | |
| category | Yes | Category slug or name. Call list_budget_categories first if unsure. | |
| direction | No | ||
| ledger_id | Yes | ||
| description | No | ||
| amount_cents | Yes | Amount in minor units (cents). 2500 = 25.00. | |
| expense_account_id | No | Optional source-of-money account id from list_expense_accounts. Omit to use the ledger's default. |