Skip to main content
Glama

Re-file a bank line (preview, then confirm)

accounting_refile_bank_line
Destructive

Re-file a bank line that was already filed wrongly: reverses everything it posted (one reversal journal on the line's date, payments taken back off invoices/bills) and files it again to the new target. Same target arguments as accounting_file_bank_line. TWO STEPS: first call = preview of the reversal and new journal + confirm_token; second call with confirm_token does it. Changes the user's real books — only after they have seen the preview and agreed. Needs the user's GetAccountED sign-in (they are asked to sign in the first time).

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": {
      "line_id": "<line_id>"
    },
    "name": "accounting_refile_bank_line"
  }
}

Input Schema

NameRequiredDescriptionDefault
vatNoWith account_code: split 15% VAT out of the amount (VAT vendors only). Omit to use the default for that account.
refundNoWith account_code: money in that is a refund of an expense
line_idYesThe filed bank line id
on_accountNoWhole amount on account with the customer / supplier
allocationsNoNew target: which invoices (money in) or bills (money out) this pays, with optional amounts (part payments allowed). Omit amount to settle as much as is due, in order.
business_idNoAccounting practices only: which client's books (an id from accounting_list_my_businesses). Leave out to use the books chosen at sign-in.
customer_idNoNew target: customer id — for a receipt; anything not allocated goes on account
supplier_idNoNew target: supplier contact id — for a supplier payment
account_codeNoNew target: file straight to this account (chart of accounts code)
confirm_tokenNoSecond step only: the token from the preview
supplier_nameNoNew target: supplier known only by name on its bills

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changed
    • addedInput schema / properties / account_code / description
      Added value: +"New target: file straight to this account (chart of accounts code)"
    • addedInput schema / properties / allocations / description
      Added value: +"New target: which invoices (money in) or bills (money out) this pays, with optional amounts (part payments allowed). Omit amount to settle as much as is due, in order."
    • addedInput schema / properties / allocations / items / properties / amount / description
      Added value: +"Rand allocated to this invoice or bill"
    • addedInput schema / properties / allocations / items / properties / bill_id / description
      Added value: +"Supplier bill id"
    • addedInput schema / properties / allocations / items / properties / invoice_number / description
      Added value: +"Customer invoice number"
    • addedInput schema / properties / customer_id / description
      Added value: +"New target: customer id — for a receipt; anything not allocated goes on account"
    • addedInput schema / properties / on_account / description
      Added value: +"Whole amount on account with the customer / supplier"
    • addedInput schema / properties / refund / description
      Added value: +"With account_code: money in that is a refund of an expense"
    • addedInput schema / properties / supplier_id / description
      Added value: +"New target: supplier contact id — for a supplier payment"
    • addedInput schema / properties / supplier_name / description
      Added value: +"New target: supplier known only by name on its bills"
    • addedInput schema / properties / vat / description
      Added value: +"With account_code: split 15% VAT out of the amount (VAT vendors only). Omit to use the default for that account."
  2. Added

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true, readOnlyHint=false and idempotentHint=false, and the description adds substantial context beyond them: exactly what the reversal destroys (one reversal journal, payments reversed off invoices/bills), the two-call preview/confirm protocol, and the GetAccountED sign-in requirement with first-time sign-in prompt. That is precisely what an agent needs before touching real books.

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?

Purpose and effect are front-loaded in the first sentence, followed by the two-step rule and then the safety/auth caveats in priority order. It runs as a dense paragraph of long sentences, but no sentence is filler; the 'TWO STEPS' marker aids scanning.

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 an 11-parameter destructive mutation with no output schema, the description covers the essentials: side effects, the two-step confirmation gate, and authentication. It stops short of saying what the preview response contains beyond 'reversal and new journal + confirm_token', and does not mention whether a completed re-file can be undone.

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

Parameters3/5

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

Schema coverage is 100%, so all 11 parameters including confirm_token are already documented in the schema, which sets the baseline at 3. The description adds only two useful bits — that target arguments mirror accounting_file_bank_line, and that confirm_token belongs solely to the second call — without explaining how the target arguments interact (e.g. account_code vs allocations precedence).

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?

Names a specific verb and resource ('Re-file a bank line that was already filed wrongly') and immediately states the full effect: reversal journal on the line's date, payments pulled off invoices/bills, then re-filing to a new target. This clearly separates it from accounting_file_bank_line, which the description explicitly positions as the same-target-arguments sibling.

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?

Strong when-to-use guidance: the line must already be filed wrongly, the operation runs preview-then-confirm, and it should only happen after the user has seen the preview and agreed. The 'Same target arguments as accounting_file_bank_line' line implicitly routes unfiled lines to that sibling, but the routing is never stated as an explicit rule.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.