Skip to main content
Glama

Compare FX Sources

compare_fx_sources
Read-only

Compares a bank rate with the live mid-market rate. Inputs: amount, currency_from, currency_to, bank_rate, optional bank_name. Output: each source's effective rate, markup in basis points, cost per 100,000, FX score, and the lowest-cost source.

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": {
      "amount": "<amount>",
      "currency_from": "<currency_from>",
      "currency_to": "<currency_to>",
      "bank_rate": "<bank_rate>"
    },
    "name": "compare_fx_sources"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountYesTransaction amount
bank_nameNoName of the bank (e.g. BMO, RBC, Chase)
bank_rateYesRate quoted by user's bank
currency_toYesTarget currency (ISO 4217)
currency_fromYesSource currency (ISO 4217)

Output Schema

NameRequiredDescriptionDefault
pairYes
amountYes
sourcesYes
verdictNo
audited_atNo
currency_toNo
currency_fromNo
rate_providerYes
cheapest_sourceNo
mid_market_rateYes
rate_from_cacheNo
mid_market_sourceNo
rate_timestamp_utcYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "amount": {
      +      "type": "number"
      +    },
      +    "audited_at": {
      +      "type": "string"
      +    },
      +    "cheapest_source": {
      +      "type": "string"
      +    },
      +    "currency_from": {
      +      "type": "string"
      +    },
      +    "currency_to": {
      +      "type": "string"
      +    },
      +    "mid_market_rate": {
      +      "type": "number"
      +    },
      +    "mid_market_source": {
      +      "type": "string"
      +    },
      +    "pair": {
      +      "type": "string"
      +    },
      +    "rate_from_cache": {
      +      "type": "boolean"
      +    },
      +    "rate_provider": {
      +      "type": "string"
      +    },
      +    "rate_timestamp_utc": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "sources": {
      +      "items": {
      +        "properties": {
      +          "effective_rate": {
      +            "type": "number"
      +          },
      +          "estimated_loss": {
      +            "type": "number"
      +          },
      +          "inverted_rate_applied": {
      +            "type": "boolean"
      +          },
      +          "loss_per_100k": {
      +            "type": "number"
      +          },
      +          "name": {
      +            "type": "string"
      +          },
      +          "score": {
      +            "maximum": 10,
      +            "minimum": 0,
      +            "type": "integer"
      +          },
      +          "spread_bps": {
      +            "type": "number"
      +          },
      +          "spread_pct": {
      +            "type": "number"
      +          },
      +          "type": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "name",
      +          "type",
      +          "effective_rate",
      +          "spread_bps",
      +          "spread_pct",
      +          "loss_per_100k",
      +          "estimated_loss",
      +          "score"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "verdict": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "pair",
      +    "amount",
      +    "mid_market_rate",
      +    "rate_provider",
      +    "rate_timestamp_utc",
      +    "sources"
      +  ],
      +  "type": "object"
      +}
  2. Changed2 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / stripe_api_key
      Removed value: -{
      -  "description": "Optional: Stripe secret key to fetch live FX quote",
      -  "type": "string"
      -}
  3. Added

TDQS

A3.6/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=true, so safety and external-data-fetch behavior are covered. The description adds that a 'live' mid-market rate is pulled and reports derived metrics (markup in bps, cost per 100,000, FX score, lowest-cost source), which is useful, but it does not say whether the live rate is cached, how stale it can be, or what happens if the fetch fails. Notably the annotations mark the tool non-idempotent (idempotentHint=false), and the description gives no hint about why repeated calls could differ.

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?

Two short sentences with explicit 'Inputs:' and 'Output:' labels, front-loaded with the core purpose. The Output enumeration largely restates the existing output schema and could be trimmed, but nothing is padded or buried.

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?

An output schema exists, so return values need not be spelled out, and the description still summarizes them; all five parameters are documented in the schema. What remains thin is the origin/refresh behavior of the live mid-market rate and the meaning of the FX score, which an agent would need to report results responsibly.

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 goes slightly beyond by enumerating the exact input set and calling out bank_name as optional, and by pairing the parameters with the amount/currencies context of a conversion. It adds no format or validation nuance (e.g. rate direction, decimal precision) beyond the schema's own ISO 4217 notes.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resources: 'Compares a bank rate with the live mid-market rate.' This is concrete enough to distinguish a comparison operation from the audit/report siblings, but the description never names those siblings or explains how it differs from audit_fx_transaction (which presumably also compares a quoted rate to mid-market).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: it is clear you should call it when you already hold a quoted bank rate and want to know the markup, but there is no explicit when-to-use or when-not-to-use statement, and no mention of the alternatives (audit_fx_transaction, check_fx_mid_market_rate) that would be preferred when no bank rate is supplied.

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