Skip to main content
Glama

Bind a statement to its bank account

well_bind_statement_account
Idempotent

Bind a bank statement that waits for its bank account (status needs_account) to the account the member picked, then import the lines Well already read. Nothing is read again and the file is not uploaded again.

Pass the statement's document_id and exactly one of:

  • account_id: one of the workspace's bank accounts, picked by the member from a numbered list of their accounts.

  • account_number: the account number the member typed for an account Well does not hold yet, for a bank that issues no IBAN (US, UK, Bermuda). Well finds or creates the account that carries it.

  • iban: the IBAN the member typed for an account Well does not hold yet. Well checks it, and finds or creates the account that carries it.

Call it only after the member picked an account or typed its number. That answer is the consent: do not ask again. Never pick an account yourself, and never call it for a statement that is not needs_account.

Read status, the statement's import status after the bind:

  • imported: the lines are in Well. minted_count, matched_count, review_count and already_present_count are the import's own counts; a missing count is unknown, never 0.

  • needs_account: the bind did not resolve an account Well can import into. Say so in one line.

  • duplicate, skipped or failed: the statement left needs_account without an import. Say which, in one line. On success: false, nothing was written: error says why (an account that is not in this workspace, a number or an IBAN that is not valid, or a number or an IBAN different from the one the statement prints).

It writes only inside Well.

Input Schema

NameRequiredDescriptionDefault
ibanNoThe IBAN the member typed, when the account is not in Well yet.
account_idNoThe workspace bank account the member picked.
document_idYesThe statement's document, as the import result or the follow-up task names it.
workspace_idNoTarget workspace. Omit when the token authorizes one workspace. Required when it authorizes several — a write lands in exactly one workspace and this call would not say which.
account_numberNoThe account number the member typed, for an account Well does not hold yet.
conversation_idNoThe conversation id returned by the previous Well result, in its meta under well/conversation_id, in its structuredContent, or in its JSON text block. Pass it back on every call in the same conversation, including a call a card makes, so the chosen workspace and the earlier answers still apply. It decides the conversation on its own: nothing the host states about the session replaces it. Omit it only on the first call of a conversation.
idempotency_keyNoOptional client-supplied key. A retried write with the same key returns the original result instead of re-applying the operation.
workspace_scopeNoRestrict this call to the family: the token's primary workspace plus the company workspaces under it that you are a member of. Unrelated authorized workspaces drop out of the read; row reads merge across the family, while a per-workspace figure still reports exactly one workspace.

Output Schema

NameRequiredDescriptionDefault
errorNo
statusNo
successYes
document_idNo
minted_countNo
review_countNo
matched_countNo
conversation_idNoThe conversation this result belongs to. Pass it back as the conversation_id argument on every later Well call in the same conversation.
newly_connectedNoTools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. The connected-line rule says when to tell an entry; when it does, one line per entry, in the person's language: "<name> is connected.". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later.
conversation_id_noteNoPresent only when the server opened a fresh lane, stating that no choice recorded earlier was read.
already_present_countNo
conversation_id_sourceNoWhere the conversation id came from: the host's own request meta, the caller's argument, or a fresh lane the server opened.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only give the flag profile (writes, idempotent, not destructive, closed-world). The description adds substantive behavior: nothing is re-read or re-uploaded, per-status post-conditions (`imported`/`needs_account`/`duplicate`/`skipped`/`failed`), that `success: false` means nothing was written, and what the errors mean.

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 opening sentence with the routing and guardrails following in clear bulleted blocks. It is long, and the status enumeration partly restates what the output schema already carries, which is the only real waste.

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 8 parameters, an output schema, and existing annotations, everything an agent needs is present: when to call, which parameter path to choose, what the member's answer implies for consent, how to read each returned status, and what a failure guarantees.

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 100%, so the baseline is 3; the description earns the extra point by supplying the 'exactly one of account_id / account_number / iban' constraint that the flat schema does not encode, plus the find-or-create semantics for `account_number` and `iban`. It says nothing about `workspace_id`, `conversation_id`, or `idempotency_key`, but the schema already documents those.

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?

States a specific verb and resource ('Bind a bank statement ... to the account the member picked, then import the lines') and scopes it to statements in `needs_account`. This clearly separates it from siblings like well_get_statement_import_result, well_upload_statement_content, and well_assign_account.

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 preconditions ('Call it only after the member picked an account or typed its number'), explicit exclusions ('never call it for a statement that is not needs_account', 'never pick an account yourself'), and a routing decision between the three alternative parameter paths keyed to IBAN vs non-IBAN banks.

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.

Resources