add_expense
Record an expense with date, amount, and category. Optionally add subcategory and note, and get the new expense ID.
Instructions
Insert one expense row and return the new row id.
Args:
date: Calendar date of the expense, preferably YYYY-MM-DD.
amount: Monetary amount (positive number).
category: High-level label (e.g. food, transport).
subcategory: Optional finer grouping (default empty string).
note: Optional free text (default empty string).
Returns:
A dict with status "ok" and id set to the new SQLite
INTEGER PRIMARY KEY, or None if the driver does not expose it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | ||
| note | No | ||
| amount | Yes | ||
| category | Yes | ||
| subcategory | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||