Skip to main content
Glama
Beankeeper

Beankeeper

Official

txn_bulk_recategorize

Moves matching lines from one account to another in bulk, with dry-run preview, selection token, and atomic apply.

Instructions

Move every line on account that matches the txn_list filters to to_account, posting one correction per line exactly as txn_recategorize does. Call with dry_run first for the matched count, debit, credit and net totals per currency, a sample and a selection_token, then pass that selection_token to apply exactly those lines; if the lines changed, SELECTION_CHANGED is returned and nothing is written. Lines of earlier corrections are left out and counted in excluded. Needs a narrowing filter. Applies atomically up to 500 lines and returns one receipt that audit_undo reverses as a unit. Retry with the same posting_reference and on_conflict skip. Propose-only credentials return one pending proposal that freezes the matched lines.

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": {
      "company": "<company>",
      "account": "<account>",
      "to_account": "<to_account>"
    },
    "name": "txn_bulk_recategorize"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoLast transaction date to match (inclusive).
dateNoYYYY-MM-DD posting date. Defaults to each source transaction's date.
fromNoFirst transaction date to match (inclusive).
metaNoExact `KEY=VALUE` matches on top-level metadata keys, combined with AND.
accountYesSource account. Selects the line to move in each matched transaction.
companyYes
dry_runNoValidate the batch and return the matched count, totals, a sample and a `selection_token` without writing.
currencyNoCurrency code. Required with an amount filter if the company uses multiple currencies.
metadataNoCase-insensitive substring of the transaction metadata.
amount_eqNoExact entry amount in major units.
amount_gtNoExclusive minimum entry amount in major units.
amount_ltNoExclusive maximum entry amount in major units.
directionNo
referenceNoExact reference of the original transactions to match.
to_accountYesActive account to receive each matched line.
descriptionNoCase-insensitive substring of the transaction description.
on_conflictNo
tax_categoryNoExact entry tax category to match.
selection_tokenNoThe `selection_token` from a dry run. If the filters now match other lines, nothing is written and `SELECTION_CHANGED` is returned.
to_tax_categoryNoTax category for each destination line. Defaults to each source line's category.
posting_referenceNoIdempotency reference for the batch. Use `on_conflict` "skip" for an exact retry.
posting_descriptionNoDescription for each correcting posting.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.2.0

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond readOnlyHint=false, the description discloses substantial behavior: dry-run outputs, selection-token staleness via SELECTION_CHANGED with no write, exclusion of earlier correction lines, atomic application up to 500 lines, one receipt reversible by audit_undo, idempotent retry behavior, and pending-proposal behavior for propose-only credentials. These details materially inform safe invocation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core action is front-loaded and the paragraph is dense but purposeful; each sentence carries workflow, safety, idempotency, or return-value information. The semicolon-heavy packing makes it slightly harder to scan, but it is appropriately sized for a 22-parameter mutation tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity, the lack of an output schema, and minimal annotations, the description is complete enough: it explains the dry-run/apply flow, key error behavior, atomicity limit, excluded lines, receipt/undo relationship, and propose-only path. An agent has the information needed to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already high at 86%, but the description adds operational meaning for dry_run, selection_token, posting_reference, on_conflict, to_account, and the filter requirement. It explains not just what the parameters are but how they interact across the dry-run and apply steps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific bulk mutation: move every matching line on an account to to_account, posting one correction per line. It explicitly ties the per-line behavior to sibling txn_recategorize, making the bulk versus single-line distinction inferable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives concrete workflow guidance: call with dry_run first, reuse the returned selection_token to apply exactly those lines, and retry with posting_reference plus on_conflict skip. It also notes that a narrowing filter is required and explains propose-only credentials. It does not explicitly state when to choose this over txn_recategorize or other bulk siblings, so it falls short of full when/when-not/alternatives guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools