Skip to main content
Glama

ref_finance_get_swap_estimate

Calculate token swap estimates on Ref Finance using input and output tokens, amounts, and preferred pools or smart routing for optimal rates.

Instructions

Get a swap estimate from the Ref Finance exchange contract based on two tokens and a pool id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountYesThe amount of the input tokens to swap
estimateTypeNoThe type of estimate to get. Defaults to the ref finance smart router to find the best price over all available pools
networkIdNomainnet
tokenInYes
tokenOutYes
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It mentions 'estimate' implying a read-only, non-destructive operation, but doesn't disclose rate limits, authentication needs, error conditions, or what the estimate output contains. This is inadequate for a tool with complex parameters.

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 a single, well-structured sentence with zero wasted words. It's front-loaded with the core purpose and efficiently conveys the basic concept without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 5 parameters, nested objects, no annotations, and no output schema, the description is severely incomplete. It doesn't explain what the tool returns, how to interpret results, or provide context about the Ref Finance ecosystem. The agent would struggle to use this effectively without additional documentation.

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

Parameters2/5

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

Schema description coverage is only 40%, but the description adds almost no parameter semantics beyond mentioning 'two tokens and a pool id'. It doesn't explain the relationship between parameters, the meaning of 'swap estimate', or clarify the 'estimateType' options. The description fails to compensate for the low schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get a swap estimate') and the target ('from the Ref Finance exchange contract'), specifying it's based on tokens and a pool id. It distinguishes from sibling tools like 'ref_finance_execute_swap' by focusing on estimation rather than execution, but doesn't explicitly mention this distinction.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites, timing considerations, or compare it to sibling tools like 'ref_finance_get_pools' or 'ref_finance_execute_swap', leaving the agent to infer usage 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

Related 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/nearai/near-mcp'

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