Skip to main content
Glama
Beankeeper

Beankeeper

Official

txn_bulk_attribute

Bulk-assign the full amount of up to 500 filtered account entries to one project atomically; dry-run first, then apply the returned selection token to confirm exactly those entries.

Instructions

Attribute the full amount of every entry on account that matches the txn_list filters to one project, atomically and up to 500 entries. Call with dry_run first and pass its selection_token to apply exactly those entries. The live lines of standing recategorizations are included. Entries already attributed in full to the project are skipped, and entries attributed to another project are kept unless replace_existing is true (a replacement needs a later date); attribution reports newly_attributed, already_attributed, replaced and skipped_attributed_elsewhere. The selection_token covers each entry's current attribution. If single-line guards refuse entries, nothing is written and details.blocked_lines names each one. Proposal-only access queues one change for the frozen entries.

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>",
      "project": "<project>"
    },
    "name": "txn_bulk_attribute"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoLast transaction date to match (inclusive).
dateNoYYYY-MM-DD effective date. Defaults to each entry's transaction date.
fromNoFirst transaction date to match (inclusive).
metaNoExact `KEY=VALUE` matches on top-level metadata keys, combined with AND.
accountYesRevenue or expense account. Selects the entry to attribute in each matched transaction.
companyYes
dry_runNoValidate the batch and return the matched count, totals, a sample and a `selection_token` without writing.
projectYesProject to receive the full amount of each matched entry.
billableNoWhether each split may be billed to the project's customer. Defaults to internal.internal
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.
descriptionNoCase-insensitive substring of the transaction description.
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.
replace_existingNoReplace attributions to other projects. By default those entries are skipped and counted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.2.0

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only supply readOnlyHint=false, so the description carries the burden and does so: atomicity, the 500-entry ceiling, skip-vs-replace rules, the requirement that a replacement use a later date, all-or-nothing failure with details.blocked_lines, SELECTION_CHANGED protection, and the proposal-only access path that queues one change. This is unusually rich disclosure of consequences beyond the annotation.

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?

Front-loaded with the core action and batch limit, and every sentence adds operational detail rather than restating the name. The prose is dense and packs multiple clauses per sentence, which slightly reduces scannability, but nothing is filler.

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?

For a 20-parameter mutation tool with no output schema, the description covers the outcome categories, the failure modes, the dry-run/apply contract, the batch cap, and the proposal-only path. An agent has what it needs to select and invoke it safely without opening other docs.

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

Parameters4/5

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

Schema coverage is 90%, so the baseline is 3; the description still adds genuine meaning by tying selection_token to a prior dry run and to current attribution state, and by clarifying that replace_existing requires a later date. The report field names (newly_attributed, already_attributed, replaced, skipped_attributed_elsewhere) also tell the caller what the outcome partitions mean.

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

Purpose4/5

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

"Attribute the full amount of every entry on account that matches the txn_list filters to one project" gives a specific verb (attribute), resource (entries on an account), and target (one project), plus a batch cap of 500. It implies the filtering contract by referencing txn_list, which separates it informally from bulk recategorize/associate, but it never names those siblings to draw a hard line.

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 prescribes a concrete workflow: call with dry_run first, then pass the returned selection_token to apply exactly that selection, and it explains when entries are skipped vs. replaced. There is no explicit statement of when to prefer this over txn_bulk_associate or txn_recategorize, so the alternative-selection guidance is only implied.

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