add_transaction
Logs a new expense transaction to the database, capturing amount, merchant, category, and card used for expense tracking.
Instructions
Logs a new expense (transaction) to the database.
**IMPORTANT: Call `get_expense_logging_rules` first to learn the rules for parsing user input.**
Args:
amount: The value of the transaction (must be positive).
merchant: The name of the place/service (e.g., "Swiggy", "Amazon").
category: The expense category. Must be a valid category from get_expense_logging_rules.
card_name: The name of the credit card used.
platform: How the payment was made (e.g., "Direct", "SmartBuy").
date: Optional date in 'YYYY-MM-DD' format. Defaults to today.
is_online: Explicit flag if known (True=Online, False=Offline). If None, system infers.
Returns:
dict: Confirmation details including Transaction ID and status.
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": {
"amount": "<amount>",
"merchant": "<merchant>",
"category": "<category>",
"card_name": "<card_name>"
},
"name": "add_transaction"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | ||
| amount | Yes | ||
| category | Yes | ||
| merchant | Yes | ||
| platform | No | Direct | |
| card_name | Yes | ||
| is_online | No |