Skip to main content
Glama

LATAM Business, Fiscal & FX (x402)

Validate a Mexican CLABE or Argentine CBU and identify the bank

latam_validate_bank_account
Read-onlyIdempotent

Checks an interbank account key and names the institution behind it: the 18-digit Mexican CLABE with the Banxico Mod-10 check digit, and the 22-digit Argentine CBU with its two independent block checksums. It returns the bank name from the embedded institution code, the branch and account portions, and for a CLABE the plaza code. Use it before a first payout, when registering supplier or payroll bank details, or to reject a mistyped key at the point of entry instead of waiting for a returned transfer. Do not use it for tax IDs, which latam_validate_tax_id handles, do not loop it over a payout list when latam_validate_batch checks up to 100 keys for the same single charge, and do not read a pass as confirmation that the account exists, is open or belongs to the named holder: the checksum proves only that the key is well formed, so it catches typos, not fraud. Read-only, deterministic and fully offline at the edge, so a retry is safe. Costs 0.008 USDC per call via x402 v2 on Base (eip155:8453) or a B2B X-API-Key; an unpaid call returns HTTP 402 with a PAYMENT-REQUIRED header. One call is one charge no matter how many identifiers it carries, so batching is strictly cheaper than looping. It never throws on bad input: a malformed key comes back with valid false and the reasons in errors, so branch on results[0].valid.

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": {
      "value": "<value>"
    },
    "name": "latam_validate_bank_account"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeNoBank account standard. CLABE is the 18-digit Mexican Banxico interbank key and CBU the 22-digit Argentine BCRA key. Omit it to auto-detect by length; supply it to force a strict check and get a clear error instead of a silent 'UNKNOWN'.
valueYesThe account key, with or without spaces or dashes: 18 digits for a Mexican CLABE, 22 for an Argentine CBU. Separators are stripped before the checksum is computed.
countryNoISO 3166-1 alpha-2 country code, MX for a CLABE or AR for a CBU. Optional, since the two standards differ in length.

Output Schema

NameRequiredDescriptionDefault
okYestrue when the request was processed and paid for. It does not mean the documents were valid: read results[].valid for that.
metaYesProvenance of the call, worth logging.
errorNoStable machine-readable failure code, present only on a rejected call. Common values: 'invalid_payment' and 'settlement_failed' (x402 verification or settlement refused, returned with HTTP 402), 'B2B_KEY_INVALID' and 'B2B_QUOTA_EXCEEDED' (B2B X-API-Key path). An invalid document is NOT an error: the call succeeds with valid false and a populated errors array.
messageNoHuman-readable explanation of the failure. Safe to log or surface to a human operator.
resultsNoA single-element array holding the verdict for the key you sent, with the bank name and the account breakdown under decoded.
summaryYesAggregate counters, so a batch can be triaged without walking the results array.
warningsNoNon-fatal notes, such as a batch truncated at 100 items or a request that carried nothing to check.
suggestedNextStepsNoChaining hints for autonomous agents: sibling paid APIs commonly called right after this one, selected from what was actually found in the results. Purely advisory, never required.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, non-destructive and closed-world, and the description adds real value beyond them: deterministic edge-local execution, cost of 0.008 USDC via x402 v2 on Base or X-API-Key, the HTTP 402 payment-required failure mode, and the fact that it never throws but returns valid=false with errors. The one thing left implicit is the response shape beyond results[0].valid, which the output schema already supplies.

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 standards are front-loaded, then usage, then exclusions, then commercial terms — a sensible ordering with almost no filler. It is dense and long for a validator; the payout-cost argument is stated twice (looping is cheaper to batch, one call is one charge), which is mild redundancy.

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?

Output schema exists, so return values need not be explained, yet the description still tells the agent how to branch on results[0].valid and errors. Combined with cost, auth, failure semantics and the checksum-versus-fraud caveat, an agent has everything needed to call this correctly.

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% and the schema already explains auto-detect by length, separator stripping, and the country enum, so the baseline of 3 applies. The description adds no parameter-level detail beyond that, and its claim that one charge covers however many identifiers the call carries slightly strains the singular string `value` parameter, which an agent could misread.

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 (check an interbank account key, name the institution) and pins down the two standards it handles, including digit counts and checksum algorithms. An agent can separate it from latam_validate_tax_id and latam_validate_batch on purpose alone.

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?

Gives concrete use moments (before a first payout, registering supplier/payroll details, rejecting typos at point of entry) and explicit exclusions: not for tax IDs (route to latam_validate_tax_id), not for looping over payout lists (route to latam_validate_batch, 100 keys per charge). It also states the interpretation boundary — a pass means well-formed, not that the account exists or belongs to the holder.

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.