Skip to main content
Glama

LATAM Business, Fiscal & FX (x402)

Convert an amount across LATAM currencies at live rates

latam_convert_fx
Read-only

Converts an amount between LATAM and reference currencies at live edge-cached rates: MXN, ARS, CLP, COP, PEN, UYU, BRL, USD and EUR. One call can fan out to several targets at once, or to every supported currency when you omit the target list, and each conversion returns the converted amount with the rate and its inverse. Use it to price a cross-border invoice, normalise a multi-country report to one currency, or estimate a payout. Do not use it to settle a payment or to book an FX trade: the rates are indicative and come from public sources, so always check the source field, which reports 'fallback-reference' when every live upstream timed out and static reference rates were used. Do not use it for validation either, which the three sibling tools handle, although latam_validate_batch can bundle an FX conversion into the same charge. Read-only and non-destructive, but NOT deterministic: it reads live market data, so two identical calls minutes apart can legitimately return different figures, and a retry is safe but will not necessarily reproduce the earlier numbers. 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: an unsupported currency code is replaced by the default and noted in fx.warnings rather than rejected, so read fx.base and fx.warnings to confirm the pair you actually got.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "latam_convert_fx"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoTarget currency or array of target currencies, ISO 4217. Omit it to receive every supported currency except the source in a single call, which costs the same as one target.
fromNoSource currency, ISO 4217. Defaults to USD. An unsupported code falls back to USD and adds a warning instead of failing.USD
amountNoAmount to convert, in the source currency, as a plain number. Defaults to 1, which gives you the raw rates.

Output Schema

NameRequiredDescriptionDefault
fxNoLive FX conversion result.
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.
resultsNoAlways empty for this tool, since no identifier was submitted.
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.6/5.0
Behavior5/5

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

Annotations already cover readOnly/openWorld/idempotent/destructive, but the description goes well beyond: it discloses the indicative-rate sourcing, the 'fallback-reference' degradation signal, the cost model (0.008 USDC via x402 on Base, or X-API-Key), the HTTP 402 payment-required behavior, one-charge-per-call batching economics, and the important non-determinism/retry caveat. It also explains the silent-fallback error handling contract that nothing in the schema states.

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 usage are front-loaded, and nearly every sentence carries real information (caveats, cost, failure modes). It is one long paragraph that repeats the currency enum already in the schema and could be split for scanability, but there is little dead weight.

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?

Despite an output schema existing, the description still usefully sketches the return shape (converted amount, rate, inverse rate) and tells the agent to read fx.base and fx.warnings to verify the actual pair. For a live-data tool with a cost and a non-obvious failure mode, nothing an agent needs to call it correctly is missing.

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 description coverage is 100%, so the omission-of-targets semantics, defaults, and enum fallback behavior are already documented per-parameter. The description mainly restates the currency list and the 'omit to get everything at the same price' rule, adding only the pricing implication rather than new meaning about parameter values.

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 (converts an amount between currencies) plus the exact currency set and the fan-out behavior. It is unmistakably different from the three latam_validate_* siblings, which the description explicitly names as a separate concern.

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 positive cases (price a cross-border invoice, normalise a multi-country report, estimate a payout) and explicit exclusions (not for settling a payment, not for booking an FX trade, not for validation), routing validation to the sibling tools. It even notes that latam_validate_batch can bundle an FX conversion, covering the overlap case.

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.