Skip to main content
Glama

swap_curve

Swap between two assets on a Curve StableSwap pool with minimal slippage. Ideal for stablecoin conversions like USDC to USDT or DAI.

Instructions

Swaps between two assets on a Curve StableSwap pool. Ideal for stablecoin-to-stablecoin conversions (USDC↔USDT↔DAI) with minimal slippage. The caller must supply the pool address and the indices of the input/output tokens within that pool. Assumes fromToken has already been approved to the pool; simulation will fail clearly if approval is missing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
poolYesCurve pool contract address.
from_token_indexYesIndex (0, 1, 2, ...) of the input token within the pool.
to_token_indexYesIndex of the output token within the pool.
from_token_addressYesERC-20 address of the input token.
to_token_addressYesERC-20 address of the output token.
amount_inYesAmount of input token in human-readable units.
min_amount_outYesMinimum acceptable amount of output token (slippage protection).
chain_idNoChain ID. Default: 1 (Ethereum mainnet).
Behavior4/5

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

With no annotations, the description carries full burden. It discloses the approval prerequisite and notes that simulation will fail clearly if missing. However, it does not mention that this is a write operation or provide details on gas costs or failure modes beyond approval.

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 concise sentences with no unnecessary words. The first sentence states purpose, the second provides key usage details. Every word adds 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?

The description covers purpose, ideal use, prerequisites, and expected failure mode. With no output schema, it omits the return value (likely transaction hash), but the simulation note partially compensates. It is sufficient for an agent to invoke correctly.

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

Parameters4/5

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

Schema coverage is 100%, providing baseline 3. The description adds value by explaining the purpose of pool and indices, and by stating the approval prerequisite, which is not in 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 'swaps' and the resource 'assets on a Curve StableSwap pool'. It specifies the primary use case (stablecoin-to-stablecoin conversions with minimal slippage) and distinguishes it from general swap tools like 'execute_swap'.

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?

The description advises when to use (stablecoin conversions) and lists prerequisites (pool address, token indices, approval). It does not explicitly state when not to use or compare to sibling tools, but the context is sufficiently 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/felippeyann/agentfi'

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