Skip to main content
Glama

spectra_quote_trade

Estimate output, price impact, and minimum output for a PT trade on Curve AMM. Uses on-chain quotes for accuracy or fallback math estimate.

Instructions

Estimate expected output, price impact, and minimum output for a PT trade. Automatically uses on-chain Curve get_dy() for exact quotes when a public RPC is available for the chain. Falls back to a conservative constant-product math estimate if on-chain quoting fails.

Side: "buy" = spend underlying/IBT to buy PT (e.g. spend USDC-worth to get PT) "sell" = sell PT to receive underlying/IBT

This tool only quotes PT trades on the Curve AMM pool. YT does not trade on the pool directly — YT is acquired by minting (deposit IBT to get PT+YT) or sold via flash-redeem. To estimate YT value: YT price = 1 - PT price in underlying terms.

Returns: expected output amount, spot & effective rates, price impact, and minOut at the specified slippage tolerance. Also includes pool context: IBT/PT reserves with ratio, and IBT APR composition (organic vs incentive yield). The output indicates whether the quote came from on-chain (exact) or math estimate.

On-chain quotes reflect the actual Curve StableSwap-NG amplification parameter and current pool state — significantly more accurate than the math estimate, especially for large trades.

Use spectra_simulate_trade to preview your full portfolio state after this trade (BEFORE / TRADE / AFTER with deltas). Use spectra_compare_yield to evaluate whether the trade makes sense relative to variable rates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainYesThe blockchain network
pt_addressYesThe PT contract address (0x...)
amountYesAmount of input token (in human-readable units, not raw decimals)
sideYesTrade direction: 'buy' = acquire PT, 'sell' = dispose PT
slippage_toleranceNoSlippage tolerance in % (default 0.5%). minOut = expectedOut * (1 - tolerance/100)
Behavior5/5

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

Discloses the quote method (on-chain get_dy() or math estimate), accuracy differences, and return contents including pool context and source indication. No annotations exist, so description fully covers behavior.

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?

Well-organized with front-loaded purpose, but slightly lengthy. However, every section adds value, so it's still highly effective.

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?

Given no output schema, the description thoroughly explains return values (expected output, rates, pool context, etc.) and covers all necessary context for a quoting tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All 5 parameters have schema descriptions. The tool description adds extra meaning, such as defining side meanings ('buy' vs 'sell'), explaining slippage formula, and clarifying amount units.

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 estimates expected output, price impact, and minimum output for a PT trade. It distinguishes from YT and mentions specific sibling tools for alternatives.

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

Usage Guidelines5/5

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

Explicitly explains when to use on-chain vs fallback, and suggests alternatives like spectra_simulate_trade and spectra_compare_yield for additional context.

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/Finanzgoblin/spectra-mcp-server'

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