Skip to main content
Glama

Solana: solanaGetTokenPairPrice

solanaGetTokenPairPrice
Read-onlyIdempotent

Quote the spot exchange rate between two SPL tokens on Solana, using DEX liquidity for best execution. Obtain the rate and route for any token pair.

Instructions

Quote the spot exchange rate between two SPL tokens, routed across Solana DEX liquidity for best execution. Returns the rate of inputMint denominated in outputMint, plus the route taken.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputMintYesSPL mint address of the input token (the one being sold/spent). Use 'So11111111111111111111111111111111111111112' for wrapped SOL.
outputMintYesSPL mint address of the output token (the one being bought). Use 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v' for USDC.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removedv1.1.0
  3. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already indicate read-only, non-destructive, idempotent behavior. The description adds useful context about routing across DEX liquidity and returning the route, which is behavioral detail beyond the annotations. No contradictions exist.

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 two sentences, concise, and front-loaded with the main purpose. It avoids redundancy and every sentence adds value.

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 two-parameter tool with no output schema, the description sufficiently explains what it returns (rate plus route) and the context. It is not over-detailed, but it covers the essentials. A slightly higher score would require more detail on route structure, but that is not critical.

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 schema provides 100% coverage with descriptions for both inputMint and outputMint, including example addresses. The description's phrase 'inputMint denominated in outputMint' clarifies rate direction but is largely inferable from the schema, so the description adds minimal extra meaning.

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 clearly states the tool quotes the spot exchange rate between two SPL tokens and specifies the direction (inputMint denominated in outputMint). It also distinguishes itself from siblings like solanaGetTokenPrices by focusing on a single pair and returning the route taken.

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 provides clear context: use this tool when you need a pair-specific spot rate with best-execution routing. It does not explicitly mention alternatives or when not to use it, but the context is sufficient for an agent to match it to the need.

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

Deploy Server

Other Tools