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.
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": {
"date": "<date>",
"amount": "<amount>",
"category": "<category>"
},
"name": "add_expense"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | ||
| note | No | ||
| amount | Yes | ||
| category | Yes | ||
| subcategory | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||