Skip to main content
Glama

Universal Data — x402 + MPP Payment Setup

api_bank_fx_spread

Read-onlyIdempotent

Compare a bank’s quoted foreign-exchange rate with a user-supplied mid-market rate and calculate hidden spread cost. One call costs 0.01 USDC on Base x402; customer-owned provider credentials use X-Provider-Key header where needed.

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": {
      "source_amount": "<source_amount>",
      "mid_rate": "<mid_rate>",
      "quoted_rate": "<quoted_rate>"
    },
    "name": "api_bank_fx_spread"
  }
}

Input Schema

NameRequiredDescriptionDefault
mid_rateYesTarget currency units per source currency, mid-market reference
quoted_rateYesTarget currency units per source currency, bank quote
source_amountYesAmount in source currency

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already establish readOnly, idempotent, non-destructive and open-world, so the safety profile is covered. The description adds genuinely non-structured behavior: a 0.01 USDC per-call charge on Base x402 and the X-Provider-Key header for customer-owned credentials — material facts an agent would otherwise miss. It stops short of describing the shape of the computed result.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the core operation, followed by the operational caveats (cost and credential header). No filler or redundant restatement of the tool name.

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?

For a simple three-number read-only computation with no output schema, the description covers purpose, cost, and auth. The one remaining gap is what the response contains (spread amount, percentage, currency assumptions), which the phrase 'hidden spread cost' only partially implies.

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 all three numeric parameters are already documented, and the baseline of 3 applies. The description adds only the framing that mid_rate is user-supplied rather than fetched, which is marginal meaning 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 names a specific verb pair (compare, calculate) and a specific resource (a bank's quoted FX rate versus a user-supplied mid-market rate, yielding hidden spread cost). This is clearly distinguishable from adjacent siblings such as api_bank_loan_compare or api_bank_terms without opening a schema.

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 implied by the phrasing: this is the tool to reach for when you have a bank quote and a reference mid-market rate. There is no explicit when-to-use/when-not-to-use statement and no named alternative, so the agent must infer the selection criteria.

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