Skip to main content
Glama

get_token_fiat_rate

Read-only

Fetch a live token-to-fiat spot rate from CoinGecko to price crypto-denominated x402 payment mandates in fiat. Supports USDC, USDT, EURC, ETH and SOL.

Instructions

Fetch a spot token->fiat exchange rate from the CoinGecko public API, e.g. to price a crypto-denominated (x402) mandate in fiat. Supports USDC, USDT, EURC, ETH and SOL. Requires the optional 'oracle' extra (pip install ap2-iso20022[oracle]). Reaches an external service: the returned rate is a live spot price, not a guarantee, and this tool never moves money.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
token_symbolYesToken symbol: USDC, USDT, EURC, ETH or SOL.
fiat_currencyNoFiat currency code to price in.USD

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.0.3

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, openWorld, non-idempotent and non-destructive, so the safety profile is covered. The description adds genuinely new context: it reaches an external service, the rate is a live spot price rather than a guarantee, and an optional 'oracle' extra must be installed. The 'never moves money' clause largely restates destructiveHint=false, which keeps it out of 5 territory.

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?

One dense but well-ordered passage: purpose, use case, supported values, install prerequisite, then the risk caveat. Every sentence earns its place, though the install and caveat clauses could be trimmed slightly.

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 no explanation. The description covers prerequisites, external dependency, supported inputs, and the non-guarantee caveat — everything an agent needs to invoke 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% and both parameters (token_symbol, fiat_currency with default USD) are fully documented in the schema. The description's token list merely echoes the schema, adding no syntax or format detail beyond it, so baseline 3 applies.

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?

Specific verb (fetch) + resource (spot token->fiat exchange rate) + named provider (CoinGecko public API) + a concrete use case (pricing an x402 mandate in fiat). None of the sibling tools overlap, so the agent can route unambiguously.

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

Usage Guidelines4/5

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

Gives a clear usage context ('to price a crypto-denominated (x402) mandate in fiat') and states the supported token set. It does not name an alternative or an explicit when-not-to-use, but no sibling tool competes for this job.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.