Skip to main content
Glama

FX invoicing and conversion

fx_invoicing
Read-onlyIdempotent

Compare the local currency that lands from a USD invoice across the payment providers you name, using each provider's fees as you supply them, against a published reference exchange rate (European Central Bank reference rates, USD base).

Behavior: Deterministic, idempotent calculation with zero external side effects. For each rail you give (fixed fee in USD, percentage fee, exchange-rate markup) it computes the net USD after fees, the landed local amount, the total cost and its share of the invoice, ranks the rails, and reports the saving of the best over the worst. TrueCalci does not preset or verify any provider's pricing: providers price per currency route and account, so the fees are yours.

Usage Guidelines: Use when a freelancer or vendor invoicing in USD wants to compare payout providers whose fees they know. Do not use for domestic US employee vs contractor parity; use contractor_parity instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
railsYesThe payment providers to compare, with the fees YOUR account is charged for this route.
as_of_dateYesCivil date YYYY-MM-DD. Selects the rule pack in force on that date. Required: the engine will not assume a date.
invoiceUsdYesGross billed invoice amount in USD ($). Must be a positive number greater than 0.
targetCurrencyNoPayout destination currency code: 'EUR' (Euro), 'GBP' (British Pound), 'CAD' (Canadian Dollar), 'AUD' (Australian Dollar), 'INR' (Indian Rupee), 'SGD' (Singapore Dollar), 'BRL' (Brazilian Real), 'MXN' (Mexican Peso), or 'PHP' (Philippine Peso).EUR
customMidMarketRateNoOptional: your own USD-to-target exchange rate, used instead of the published reference rate.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
railsNo
currencyNo
disclaimerNo
worst_railNo
invoice_usdNo
minor_unitsNo
rate_pack_idNo
as_of_timestampNo
target_currencyNo
lowest_cost_railNo
annual_savings_usdNo
statutory_authorityNo
theoretical_max_localNo
single_invoice_savings_usdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / lowest_cost_rail
      Added value: +{
      +  "type": [
      +    "object",
      +    "null"
      +  ]
      +}
    • removedOutput schema / properties / optimal_rail
      Removed value: -{
      -  "type": [
      -    "object",
      -    "null"
      -  ]
      -}
  2. Changed1 schema field changed
    • changedInput schema / properties / rails / items / properties / name / description
      Previous value: -"Provider or method name, e.g. 'Bank wire'."New value: +"Provider name, e.g. 'Bank wire'."
  3. Changed3 schema fields changed
    • addedInput schema / properties / customMidMarketRate
      Added value: +{
      +  "description": "Optional: your own USD-to-target exchange rate, used instead of the published reference rate.",
      +  "exclusiveMinimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / rails
      Added value: +{
      +  "description": "The payment providers to compare, with the fees YOUR account is charged for this route.",
      +  "items": {
      +    "properties": {
      +      "feePercent": {
      +        "description": "Percentage fee on the amount sent (%), e.g. 0.55 for 0.55%.",
      +        "example": 0.5,
      +        "exclusiveMaximum": 100,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "fixedFeeUsd": {
      +        "description": "Fixed fee per transfer in USD ($). 0 if none.",
      +        "example": 25,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "fxMarkupPercent": {
      +        "description": "Markup over the reference exchange rate (%), e.g. 1.5 for 1.5%. 0 if the provider converts at the mid-market rate.",
      +        "example": 1.5,
      +        "exclusiveMaximum": 100,
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "name": {
      +        "description": "Provider or method name, e.g. 'Bank wire'.",
      +        "example": "Bank wire",
      +        "maxLength": 80,
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "name",
      +      "fixedFeeUsd",
      +      "feePercent",
      +      "fxMarkupPercent"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 10,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "invoiceUsd",
      -  "as_of_date"
      -]New value: +[
      +  "invoiceUsd",
      +  "rails",
      +  "as_of_date"
      +]
  4. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "annual_savings_usd": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "as_of_timestamp": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "currency": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "disclaimer": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "invoice_usd": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "minor_units": {
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "optimal_rail": {
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "rails": {
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "rate_pack_id": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "single_invoice_savings_usd": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "statutory_authority": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "target_currency": {
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "theoretical_max_local": {
      +      "type": [
      +        "string",
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "worst_rail": {
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  5. Changed2 schema fields changed
    • addedInput schema / properties / as_of_date
      Added value: +{
      +  "description": "Civil date YYYY-MM-DD. Selects the rule pack in force on that date. Required: the engine will not assume a date.",
      +  "example": "2026-09-26",
      +  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "invoiceUsd"
      -]New value: +[
      +  "invoiceUsd",
      +  "as_of_date"
      +]
  6. Changed1 schema field changed
    • removedInput schema / properties / invoiceUsd / default
      Removed value: -10000
  7. Changed2 schema fields changed
    • changedInput schema / properties / invoiceUsd / description
      Previous value: -"Gross invoice amount in USD ($)"New value: +"Gross billed invoice amount in USD ($). Must be a positive number greater than 0."
    • changedInput schema / properties / targetCurrency / description
      Previous value: -"Target local payout currency code"New value: +"Payout destination currency code: 'EUR' (Euro), 'GBP' (British Pound), 'CAD' (Canadian Dollar), 'AUD' (Australian Dollar), 'INR' (Indian Rupee), 'SGD' (Singapore Dollar), 'BRL' (Brazilian Real), 'MXN' (Mexican Peso), or 'PHP' (Philippine Peso)."
  8. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and non-destructive, and the description partly restates that ('Deterministic, idempotent calculation with zero external side effects'). It adds genuine value by disclosing the key limitation that TrueCalci neither presets nor verifies provider pricing, so supplied fees are authoritative — an important caveat for interpreting results.

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?

The definition is front-loaded with purpose, then behavior, then usage, and each block earns its place. It is slightly long because the behavior sentence enumerates outputs that the output schema already covers, but there is no filler.

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?

With a full input schema, an output schema, and rich annotations, the description only needs to add routing, the pricing caveat, and the computation intent — all of which are present. An agent has everything needed to select and call it 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 description coverage is 100%, so every parameter including the nested rail fields is already documented in the schema; baseline is 3. The description reinforces that rails carry the user's own account-specific fees and that the date selects the rule pack, but adds no syntax or format detail beyond the schema.

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?

The description states a specific verb and resource: comparing landed local currency from a USD invoice across named payment rails against the ECB reference rate. It names what is computed (net USD after fees, landed amount, cost share, ranking, best-vs-worst saving), which is far more specific than the title.

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?

It gives an explicit when-to-use ('freelancer or vendor invoicing in USD wants to compare payout providers whose fees they know') and a when-not-to-use with the named alternative ('Do not use for domestic US employee vs contractor parity; use contractor_parity instead'). This routes the agent unambiguously among siblings.

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