Skip to main content
Glama

quote_swap

Preview ETH to CPU or CPU to ETH swap without committing: get expected output and minimum after slippage. Use before executing a swap to size the trade.

Instructions

Preview an ETH↔$CPU swap without committing: returns the expected output from the Uniswap v4 Quoter (already net of the pool fee) and the minimum you would receive after slippage (a percent, e.g. 0.5 = 0.5%). It has no side effects — no approval, no transaction. Use it before swap to size the trade.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sellYesToken to spend: ETH (to buy $CPU) or CPU (to sell for ETH).
amountYesAmount of the `sell` token to spend, as a decimal string (e.g. "0.5"). 18 decimals.
slippageNoMax slippage as a percent (e.g. 0.5 = 0.5%); the floor on what you receive. Default 0.5.
Behavior5/5

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

Despite no annotations, the description fully discloses behavior: no side effects, no approval or transaction, uses Uniswap v4 Quoter, net of pool fee, and returns both expected output and minimum after slippage. This is comprehensive for a read-only preview tool.

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 three sentences, each carrying essential information with no fluff. It front-loads the purpose in the first sentence and efficiently conveys usage, safety, and output.

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?

For a simple preview tool with 3 parameters and no output schema, the description covers all necessary aspects: what it does, what it returns, its safety profile, and when to use. No gaps are evident.

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%, so baseline is 3. The description explains the 'slippage' parameter's role and default (0.5) but does not add significant new meaning beyond the schema's descriptions. The parameter semantics are adequately covered by 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 'Preview an ETH↔$CPU swap without committing' and specifies the return values (expected output and minimum after slippage). It distinguishes from the sibling 'swap' by advising to use it before 'swap', making the purpose unequivocal.

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?

Explicitly says 'Use it before `swap` to size the trade', indicating its role as a preview step. It also confirms no side effects, which guides when it's safe to call. No explicit alternatives are listed, but the sibling context includes 'swap', so the guidance is clear.

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/sodiqit/cpu-game-mcp'

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