Skip to main content
Glama

build_swap

Create an unsigned swap transaction with a 2% fee baked in, receiving a build_id to submit after signing locally. Sign with your own wallet to keep your key private.

Instructions

Build an UNSIGNED swap transaction (2% fee baked in) + a build_id. Requires an API key. Sign it locally with your own wallet, then call submit_swap with the same build_id. Your key never leaves your environment.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNo
Behavior4/5

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

With no annotations provided, the description carries the full burden. It reveals that the transaction is unsigned, includes a 2% fee, returns a build_id, and that the user's key never leaves their environment. This conveys that the tool builds rather than executes, and highlights the non-destructive nature.

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 sentences, front-loaded with the core purpose, and every clause adds value—fee, unsigned, workflow, and security note. No wasted words.

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?

The description covers the high-level workflow but omits details about the input args, full return format, error handling, or any constraints. Given that the tool has no annotations and a vague schema, the description is under-specified for an agent to invoke it correctly with realistic swap parameters.

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

Parameters1/5

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

The input schema has only an opaque 'args' object with no property definitions (0% coverage), and the description does not explain what the args should contain. There is no mention of token pairs, amounts, slippage, or any required properties, leaving the agent without the necessary parameter semantics.

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's specific function: 'Build an UNSIGNED swap transaction (2% fee baked in) + a build_id.' It distinguishes from siblings by explicitly linking to submit_swap and implying it is not the submission step.

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 provides a clear workflow: build the unsigned transaction, sign it locally, then call submit_swap with the same build_id. It also notes the API key requirement and the privacy benefit. It does not explicitly compare to alternative tools, but the workflow is unmistakably stated.

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/mmahdiahamed92-png/autonomous-intelligence-mcp'

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