Documentation
apply_pattern
apply_pattern MCP tool reference, parameters, return type, and safety hints.
What it does
Recategorizes transactions that match a description pattern, optionally saving the pattern as a rule.
(pattern: string, target_account: string, force?: boolean, persist_rule?: boolean, dry_run?: boolean, source_account?: string | null, date_from?: string | null, date_to?: string | null) => Record<string, unknown>Can write, but supports dry-run. Ask the agent to preview the result before committing changes.
When to use it
Use this section to decide whether the tool fits the user request before calling it.
Before calling
Agents should gather these facts or confirmations first.
Have exact values for required inputs: pattern, target_account.
Start with dry_run=true, show the preview, then ask before applying the change.
State the intended ledger change in plain language before calling the tool.
Parameters
Required inputs are marked clearly. Optional inputs can usually be omitted unless the workflow needs them.
patternrequiredText or regular-expression pattern used to match descriptions.
target_accountrequiredTarget category or account for the matched rows.
forceoptionalAllows the operation to continue through conflicts that would otherwise stop it.
Default: falsepersist_ruleoptionalSaves the pattern as a future match rule.
Default: falsedry_runoptionalPreview the result without committing changes.
Default: truesource_accountoptionalOptional source account filter.
Default: nulldate_fromoptionalStart date filter in YYYY-MM-DD format.
Default: nulldate_tooptionalEnd date filter in YYYY-MM-DD format.
Default: nullAgent call shape
Use the exact tool name and pass arguments as structured JSON through the MCP client.
apply_pattern
Copy this shape into agent instructions, evals, or MCP client tests.
{
"tool": "apply_pattern",
"arguments": {
"pattern": "<pattern>",
"target_account": "<target_account>",
"dry_run": true
}
}