Skip to main content
Glama

Get token prices

get_token_prices
Read-only

Fetch current or historical USD prices for Sui tokens, including source, confidence, and sample time. Lists unpriced coins with reasons. No API key required.

Instructions

Get USD prices for Sui tokens, current by default or at a past moment when at is set. Needs no API key. Current prices come from Aftermath, then DefiLlama, then Pyth, and the 24h change from DefiLlama (null when it does not list the coin). Historical prices come from Pyth when PYTH_API_KEY is set and the coin is on the verified list, and from DefiLlama otherwise. Every price names its source, confidence and the time of the sample it came from, and every coin that could not be priced is listed under unpriced with the reason. An unverified coin is priced only by its exact coin type, never by a symbol-matched feed. Accepts full coin type strings (e.g. 0x2::sui::SUI).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
atNoOptional: price AT this point in time, as Unix seconds or ISO 8601 (e.g. '2025-01-15T00:00:00Z'). Omit for current prices.
networkNoNetwork: 'mainnet' (default) | 'testnet' | 'devnet'
coin_typesYesArray of full coin type strings (e.g. ['0x2::sui::SUI', '0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC'])

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.20.0
    • changedInput schema / properties / at / description
      Previous value: -"Optional: price AT this point in time — Unix seconds or ISO 8601 (e.g. '2025-01-15T00:00:00Z'). Omit for current prices."New value: +"Optional: price AT this point in time, as Unix seconds or ISO 8601 (e.g. '2025-01-15T00:00:00Z'). Omit for current prices."
    • changedInput schema / properties / network / description
      Previous value: -"Which Sui network to run this call against: 'mainnet' (default), 'testnet', or 'devnet'. Set this per-call — different tool calls in the same session can target different networks (e.g. to compare a value on testnet against mainnet)."New value: +"Network: 'mainnet' (default) | 'testnet' | 'devnet'"
  2. First observedv1.5.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the readOnlyHint and openWorldHint annotations, the description discloses a detailed source fallback chain (Aftermath → DefiLlama → Pyth), conditional historical behavior based on PYTH_API_KEY, null handling for 24h change, output fields (source, confidence, sample time), and an `unpriced` list with reasons. It also warns that unverified coins are never matched by symbol, which is critical for correct invocation. No contradiction with annotations exists.

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?

The description is a focused block with the core operation front-loaded in the first sentence. Every subsequent sentence adds distinct, non-redundant information: source ordering, API key condition, output shape, unpriced handling, and coin type requirement. There is no filler or repetition of schema details.

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 having no output schema, the description compensates by explaining return fields (source, confidence, sample time, unpriced with reasons) and the precise inputs needed (full coin type strings, optional `at`). Combined with complete schema coverage of all parameters, an agent has all information required to call the tool correctly.

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 description coverage is 100%, so the baseline is 3. The description adds meaningful nuance beyond the schema: it explains that `at` toggles historical pricing, requires full coin type strings, and clarifies that unverified coins are only priced by exact coin type, not symbol-matched feeds. This extra guidance raises the score above baseline.

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 and resource: 'Get USD prices for Sui tokens,' and immediately specifies the temporal behavior ('current by default or at a past moment when `at` is set'). This leaves no ambiguity about the tool's function, and no sibling tool covers token pricing, so the purpose is distinct and clear.

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?

The description gives clear context on when to use each mode ('current by default or at a past moment when `at` is set') and notes that no API key is needed, which informs an agent's decision to use this tool without external setup. It does not explicitly name alternative tools, but no sibling offers price lookup, so this is a minor omission rather than a practical gap.

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