Transaction Tools¶
Transactions are the individual money movements that make up your budget's story. Transaction tools give you full control -- creating new transactions, searching and filtering existing ones, updating details, deleting mistakes, and even batch operations for importing or bulk updates. This is the most powerful tool in the set, and the one you'll likely use most often.
Every transaction in YNAB has a cleared state that tracks its journey:
- Uncleared
[U]-- Entered but not yet confirmed by the bank - Cleared
[C]-- Confirmed to match your bank statement - Reconciled
[R]-- Locked in after reconciliation (no further edits)
Usage Examples¶
You: Show me my recent transactions.
Claude calls
manage_transactionswith actionlistand responds:10 most recent transactions: - 2026-03-05 | Whole Foods | -$87.32 | Groceries [C] - 2026-03-04 | Shell Gas | -$42.00 | Transportation [U] - 2026-03-03 | Spotify | -$15.99 | Subscriptions [C] - 2026-03-01 | Employer Inc | $3,200.00 | Income [R]
You: I spent $45 at Target on household supplies today.
Claude calls
manage_transactionswith actioncreate:Transaction created: - 2026-03-06 | Target | -$45.00 | Household Supplies [U]
You: Show me all dining transactions from last month.
Claude calls
manage_transactionswith actionlistwith category and date filters:8 transactions in Dining Out (February 2026): - 2026-02-28 | Thai Palace | -$38.50 | Dining Out [C] - 2026-02-22 | Chipotle | -$12.75 | Dining Out [C] ... Total: -$342.17
You: Update that Shell Gas transaction -- it should be $44.50, not $42.
Claude calls
manage_transactionswith actionupdate:Transaction updated: - 2026-03-04 | Shell Gas | -$44.50 | Transportation [U]
Available Actions¶
| Action | Description |
|---|---|
list |
List transactions with optional date/category filters |
get |
Get full details for a specific transaction |
create |
Create a new transaction |
update |
Update an existing transaction's details |
delete |
Delete a transaction |
batch_create |
Create multiple transactions at once |
batch_update |
Update multiple transactions at once |
import |
Import transactions (matches against existing by amount/date) |
API Reference¶
manage_transactions
async
¶
manage_transactions(
ctx: Context,
action: Literal[
"list",
"get",
"create",
"update",
"delete",
"batch_create",
"batch_update",
"import",
],
budget_id_or_name: str = "last-used",
transaction_id: str | None = None,
account_id: str | None = None,
date: str | None = None,
amount: float | None = None,
payee_name: str | None = None,
payee_id: str | None = None,
category_id: str | None = None,
memo: str | None = None,
cleared: str | None = None,
approved: bool | None = None,
flag_color: str | None = None,
since_date: str | None = None,
until_date: str | None = None,
type: str | None = None,
month: str | None = None,
limit: int | None = None,
transactions: list[dict[str, Any]] | None = None,
) -> str
Manage YNAB transactions: list, get, create, update, delete, batch, import.
Dispatches to the appropriate action based on the action parameter.
Actions
list: List transactions with optional filtering. Params: budget_id_or_name, since_date, until_date, type, account_id, category_id, payee_id, month, limit. Only one of account_id/category_id/payee_id/month at a time. get: Get full detail for a transaction. Params: budget_id_or_name, transaction_id (required). create: Create a new transaction. Params: budget_id_or_name, account_id (required), date (required), amount (required), payee_name, payee_id, category_id, memo, cleared, approved, flag_color. update: Update an existing transaction. Params: budget_id_or_name, transaction_id (required), plus any optional fields to change. delete: Delete a transaction. Params: budget_id_or_name, transaction_id (required). batch_create: Create multiple transactions at once. Params: budget_id_or_name, transactions (required, list[dict]). batch_update: Update multiple transactions at once. Params: budget_id_or_name, transactions (required, list[dict]). import: Import transactions from linked bank accounts. Params: budget_id_or_name only.
Parameters:
-
ctx(Context) –The MCP context providing access to lifespan dependencies.
-
action(Literal['list', 'get', 'create', 'update', 'delete', 'batch_create', 'batch_update', 'import']) –The operation to perform.
-
budget_id_or_name(str, default:'last-used') –Budget UUID or name. Defaults to "last-used".
-
transaction_id(str | None, default:None) –Transaction UUID (required for get, update, delete).
-
account_id(str | None, default:None) –Account UUID (required for create, filter for list).
-
date(str | None, default:None) –Transaction date as ISO string (required for create).
-
amount(float | None, default:None) –Amount in dollars (required for create, converted to milliunits).
-
payee_name(str | None, default:None) –Payee display name.
-
payee_id(str | None, default:None) –Payee UUID (filter for list, field for create/update).
-
category_id(str | None, default:None) –Category UUID (filter for list, field for create/update).
-
memo(str | None, default:None) –Transaction memo.
-
cleared(str | None, default:None) –Cleared status ("cleared", "uncleared", "reconciled").
-
approved(bool | None, default:None) –Whether the transaction is approved.
-
flag_color(str | None, default:None) –Flag color for the transaction.
-
since_date(str | None, default:None) –Only return transactions on or after this date (list only).
-
until_date(str | None, default:None) –Only return transactions on or before this date (list only).
-
type(str | None, default:None) –Filter by type ("uncategorized" or "unapproved", list only).
-
month(str | None, default:None) –Filter by month (list only, "YYYY-MM" or "YYYY-MM-DD").
-
limit(int | None, default:None) –Maximum number of transactions to return (list only).
-
transactions(list[dict[str, Any]] | None, default:None) –List of transaction dicts (batch_create/batch_update only).
Returns:
-
str–Structured text with the requested transaction data.
Raises:
-
ToolError–If required parameters for the action are missing.
Source code in src/ynaa_mcp/tools/transactions.py
450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 | |