Skip to content

Transaction rules refinements (docstrings, delete verification, preview query) #11

@krisrowe

Description

@krisrowe

Problem

The core transaction rule tools (list_rules, create_rule, delete_rule) are implemented in SDK, MCP, and CLI. Several refinements remain that improve usability and test coverage.

Remaining Work

Tool docstring improvements

The MCP tool docstrings should be enhanced:

  • list_rules: note that rules execute in order sequence, with later rules overriding earlier ones for the same field
  • create_rule: document all supported criteria operators (eq, contains, gt, lt) and the distinction between:
    • merchantCriteria — matches Monarch's resolved merchant name
    • originalStatementCriteria — matches raw bank statement text
    • merchantNameCriteria — matches display merchant name
  • create_rule: warn that apply_to_existing=True can bulk-modify transaction history
  • Cross-reference update_transaction as the one-off alternative to rules for ad-hoc merchant renaming

Verify delete mutation against live API

DELETE_TRANSACTION_RULE_MUTATION returns deleted: true/false based on the captured mutation shape. The mutation has not been tested against the live API. Verify the response shape and error handling.

Preview query

PREVIEW_TRANSACTION_RULE_QUERY is captured in queries.py but not wired to SDK/MCP/CLI. This query shows which existing transactions a rule would match before creating it — useful for validation. Low priority until create_rule sees more use.

Work Breakdown

  • Improve create_rule and list_rules MCP tool docstrings per above
  • Verify delete_rule against live Monarch API
  • Wire preview query to SDK/MCP (optional, low priority)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions