Skip to main content
Glama

spraay_swap_execute

Execute a token swap on Base via Uniswap V3. Obtain a quote first, then sign and broadcast the unsigned transaction. Costs $0.01 USDC.

Instructions

Execute a token swap via Uniswap V3 on Base. Returns unsigned transaction data for the caller to sign and broadcast. Get a quote first with spraay_swap_quote. Costs $0.01 USDC.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenInYesInput token symbol (e.g. 'USDC') or contract address
amountInYesAmount to swap in human-readable units
slippageNoSlippage tolerance in percent (default: 0.5, max: 50)
tokenOutYesOutput token symbol (e.g. 'WETH') or contract address
recipientYesRecipient address for swap output (e.g. '0xYourWallet')

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesTrue when the gateway call succeeded; false when it returned an error.
dataNoThe gateway response payload on success. The exact shape depends on the tool (see the tool description and the JSON in the text content block).
errorNoHuman-readable error message, present only when ok is false.
Behavior5/5

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

The description states the tool returns unsigned transaction data, meaning it does not broadcast the transaction. It also discloses the cost ($0.01 USDC). This adds significant behavioral context beyond the annotations, which already declare readOnlyHint and destructiveHint as false.

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 long and front-loads the core action, followed by output details, prerequisite, and cost. Every sentence adds value without redundancy.

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 the tool's complexity, the description covers the essential aspects: what it does (swap on Uniswap V3 on Base), output (unsigned tx), prerequisites (get quote), and cost. The presence of an output schema further supports completeness.

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 description coverage is 100%, so the baseline is 3. The description does not elaborate on the parameters, but the schema already provides adequate descriptions for all 5 parameters.

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 executes a token swap via Uniswap V3 on Base, specifies the output as unsigned transaction data, and distinguishes from the sibling tool spraay_swap_quote by advising to get a quote first.

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 explicitly directs the agent to first get a quote using spraay_swap_quote and mentions the cost ($0.01 USDC). It does not list alternative tools or when not to use, but the prerequisite 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/plagtech/spraay-x402-mcp'

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