Skip to main content
Glama

getPrice

Retrieve the current price for any Stellar asset pair using SDEX orderbook data or recent trades. Specify base and counter assets to get the latest market rate.

Instructions

Get the current price for a Stellar asset pair from SDEX orderbook or recent trades

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseAssetYesBase asset: "XLM" or "CODE:ISSUER" (e.g. "USDC:GA5Z...")
counterAssetYesCounter asset: "XLM" or "CODE:ISSUER" (e.g. "USDC:GA5Z...")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description carries the full burden, and it only reveals that the price comes from 'SDEX orderbook or recent trades'. It does not clarify whether the orderbook or trades take precedence, whether the returned price is a midpoint, best bid/ask, last trade, or how stale the data might be. This ambiguity materially affects how an agent should interpret and use the price.

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 single, information-dense sentence with no filler. The core purpose is front-loaded, and the data-source qualifier adds useful scope without extra length.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, no annotations, and no guidance on return value shape, freshness, or source precedence. While the two parameters are well documented, an agent calling this tool cannot confidently predict what the price value represents or how to compare it with related tools like getVWAP. The description is sufficient for tool selection but incomplete for reliable invocation and result interpretation.

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?

The input schema already documents both parameters fully with concise formats and examples ('XLM' or 'CODE:ISSUER'), so the description adds no extra parameter semantics beyond labeling them as an asset pair. With 100% schema description coverage, the baseline score of 3 is appropriate.

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?

The description names a specific operation ('Get the current price'), a clear resource ('Stellar asset pair'), and a data source ('SDEX orderbook or recent trades'). It does not explicitly differentiate from siblings like getPriceHistory or getVWAP, but the emphasis on 'current' establishes a spot-price purpose that is reasonably distinguishable.

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?

The description implies when to use this tool — when a current price for an asset pair is needed — but it does not explicitly state when not to use it or mention alternatives such as getPriceHistory, getVWAP, or getOrderbook. The 'current price' phrasing provides context, but the guidance is implicit rather than explicit.

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