qb_add_transaction
Add a transaction (Check, Deposit, Credit Card Charge, or Credit Card Credit) to QuickBooks Desktop with automatic undo logging for easy reversion.
Instructions
Adds a transaction (Check, Deposit, CreditCardCharge, or CreditCardCredit). lines: [{"account": str, "amount": float, "memo": str|None}, ...]. Automatically logs an undo entry -- every add can be reverted with qb_revert_run using the returned run_id.
Pass expected_company_file (from a prior qb_company_info call) to have this refuse to run if a different file is open than you expect.
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": {
"txn_type": "<txn_type>",
"account": "<account>",
"txn_date": "<txn_date>",
"lines": "<lines>"
},
"name": "qb_add_transaction"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | Yes | ||
| payee | No | ||
| refnum | No | ||
| account | Yes | ||
| txn_date | Yes | ||
| txn_type | Yes | ||
| header_memo | No | ||
| expected_company_file | No |