Skip to main content
Glama

spectra_simulate_trade

Simulate a PT trade on Spectra to preview a wallet's portfolio before and after the trade.

Instructions

Preview what a wallet's Spectra portfolio would look like after a PT trade.

Fetches the wallet's current position (if any) and the PT pool data, computes a trade quote, then shows BEFORE / TRADE / AFTER with deltas.

Works even if the wallet has no existing position (simulates a new entry). Side: "buy" = acquire PT, "sell" = dispose PT.

Note: This simulates PT trades only, not YT. YT is acquired by minting (deposit IBT to get PT+YT) and sold via the Router's flash-redeem mechanism, not through the Curve pool directly. The wallet's YT balance is shown but not modified by this simulation.

Use spectra_get_portfolio to see current full positions. Use spectra_quote_trade for a standalone price quote without portfolio context.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainYesThe blockchain network
pt_addressYesThe PT contract address (0x...)
addressYesThe wallet address to simulate for (0x...)
amountYesAmount of input token (in human-readable units, not raw decimals)
sideYesTrade direction: 'buy' = acquire PT (input underlying), 'sell' = dispose PT (input 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?

Describes the process (fetches position and pool data, computes quote, shows before/trade/after with deltas) and edge case (works even without existing position). Clearly explains side semantics and limitations (YT not supported).

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?

Front-loaded with the main purpose, followed by stepwise explanation, edge case, side semantics, YT clarification, and sibling references. Slightly verbose but all sentences add 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?

Covers inputs, process, edge cases, and output format (BEFORE / TRADE / AFTER with deltas). No output schema, but description suffices. References sibling tools for further context.

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 well-described parameters. The description adds context about the overall flow but does not significantly enhance parameter understanding beyond the schema.

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 verb ('Preview'), resource ('Spectra portfolio'), and scope ('after a PT trade'). It distinguishes from sibling tools like spectra_quote_trade and spectra_get_portfolio by explaining their different purposes.

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 states when to use (PT trades only, not YT) and when not to (YT acquisition via minting, YT sale via Router). Also references alternative tools: spectra_get_portfolio for current positions, spectra_quote_trade for standalone quote.

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