Add a transaction
add_transactionRecords one income or expense in an account. Confirmed by default (it already happened, date today or earlier); with forecast=true it is a planned future transaction (today or later). The amount is positive; the sign comes from type. Account and category ids are the ones returned by get_accounts_and_categories. Transfers between accounts are not supported. It can be undone from the app (Ctrl+Z).
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": {
"account_id": "<account_id>",
"type": "<type>",
"amount": "<amount>",
"concept": "<concept>"
},
"name": "add_transaction"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| book | No | Account book id (from list_books). Optional if the user has only one. | |
| date | No | YYYY-MM-DD (default: today). | |
| type | Yes | ||
| scope | No | freelance = self-employed activity (needs the module). Default personal. | |
| amount | Yes | Positive amount in the account currency, up to 2 decimals. | |
| concept | Yes | ||
| forecast | No | true = planned, not yet happened (default false). | |
| account_id | Yes | ||
| category_id | No | ||
| idempotency_key | No | Optional: the same key within 24 h returns the first transaction instead of creating a duplicate. |