Skip to main content
Glama
Beankeeper

Beankeeper

Official

txn_link

Link two transactions in the same book by company, source ID, target ID, and kind to record transfers, refunds, payments, adjustments, or recategorizations and return an audit-undo receipt.

Instructions

Link two transactions in the same book. Send company, source_id, target_id, and kind (transfer, refund, payment, adjustment, recategorization, or related). For kind payment, source_id is the payment and target_id the charge it paid (CLI: txn link PAYMENT CHARGE --kind payment); a payment link the wrong way round is refused, one whose direction cannot be told is recorded with warnings, and aging counts it from the day it is recorded. Use it for journal-only charges; for typed invoices and bills use document_allocate instead. Returns a receipt for audit_undo.

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>",
      "source_id": "<source_id>",
      "target_id": "<target_id>",
      "kind": "<kind>"
    },
    "name": "txn_link"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindYes
companyYes
source_idYesID of the source transaction, such as a refund or payment.
target_idYesID of the related transaction, such as the charge or invoice.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.5/5.0
Behavior4/5

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

The only annotation is readOnlyHint=false, so the description carries most of the burden and does so well: it discloses that mis-directed payment links are refused, ambiguous directions are recorded with warnings, aging is counted from the recording date, and a receipt is returned for audit_undo. The main gap is that it doesn't state what happens to an existing link when one is re-applied (idempotency or replacement behavior).

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 the parameter list, then progressively adds edge-case behavior and the alternative. It is dense and semicolon-heavy, but every clause carries substantive information rather than filler.

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

Completeness4/5

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

For a mutating, four-required-parameter tool with no output schema, the definition covers direction rules, failure modes, and the return value (a receipt for audit_undo). It doesn't address how to remove or replace an existing link, which is the one thing an agent would still need to guess.

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?

With 50% schema coverage, the description compensates by defining the direction of source_id and target_id specifically for kind=payment (source is the payment, target the charge) and by enumerating the kind values and showing a CLI example. The company parameter's meaning is left to its pattern, and direction semantics for the other kinds (transfer, refund, adjustment) are not spelled out.

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?

"Link two transactions in the same book" gives a specific verb (link) and resource (transactions) plus a scoping constraint (same book), and the definition differentiates itself from document_allocate for typed invoices and bills. An agent can distinguish this from siblings like txn_bulk_associate or bank_feed_link without opening another schema.

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

Usage Guidelines5/5

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

Explicit routing guidance: "Use it for journal-only charges; for typed invoices and bills use document_allocate instead." This names the alternative and the exact condition that selects it, which is the strongest form of when-to-use 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