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.
Behavior4/5

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

Annotations already declare read-only, non-destructive, idempotent. Description adds that it routes across DEX liquidity for best execution and returns the route taken, providing useful behavioral context beyond annotations.

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, efficiently front-loading the core purpose and output. No redundant information.

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?

Despite no output schema, the description notes it returns the rate denominated in outputMint plus the route, which is adequate for a simple price query tool. Could mention if there are any constraints (e.g., only works on Solana mainnet), but overall complete.

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 coverage is 100% with clear parameter descriptions. The description does not add significant meaning beyond the schema, but the schema itself is sufficient. Baseline score of 3 applied.

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?

Clearly states it quotes the spot exchange rate between two SPL tokens using Solana DEX liquidity. Distinguishes from sibling tools like solanaGetTokenPrices which likely returns multiple prices.

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?

No explicit when-to-use or alternatives guidance. The description implies it's for a specific pair quote, but doesn't compare to solanaGetTokenPrices or other tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/EmblemCompany/Agent-skills'

If you have feedback or need assistance with the MCP directory API, please join our Discord server