Transactions: Recategorize similar transactions
recategorize_similar_transactions Apply a category to ALL of the user's transactions that share an exact
description and type (case-insensitive description match).
Mirrors the web "recategorize similar" prompt: after fixing one
transaction's category, sweep every other transaction with the same
description + type into that category. Useful for cleaning up a
recurring merchant in one shot.
Args:
description: The exact transaction description to match
(case-insensitive; whole-string, not a substring).
transaction_type: 'deposit', 'withdrawal', or 'transfer' — only
transactions of this type are matched.
category_name: Category to assign (case-insensitive; user-owned or
system).
exclude_transaction_id: Optional transaction id to skip (e.g. the
one the user already categorized).
Returns:
``{"success": True, "updated": N, "category": ..., "category_id":
...}`` (``updated`` may be 0 if nothing else matched), or
``{"error": "..."}`` on validation failure.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| description | Yes | ||
| category_name | Yes | ||
| transaction_type | Yes | ||
| exclude_transaction_id | No |