Skip to main content
Glama

orbs_swap

Destructive

Execute same-chain token swaps via Orbs Liquidity Hub on Polygon, BSC, Base, Linea, Blast, and Arbitrum. Resolve token addresses first for accurate trading.

Instructions

Execute a same-chain swap via Orbs Liquidity Hub (write, confirmation-gated). Supported chains: 137 (Polygon), 56 (BSC), 8453 (Base), 59144 (Linea), 81457 (Blast), 42161 (Arbitrum). Requires token addresses — use resolve_token first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainIdNoChain ID (defaults to runtime config)
toTokenYesDestination token address
fromTokenYesSource token address
fromAmountYesAmount in smallest token units
slippagePctNoSlippage percentage (0.5 = 0.5%, default 0.5)
Behavior4/5

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

Annotations already flag the tool as destructive; the description adds that it is 'confirmation-gated', meaning it will require user confirmation before execution. It also lists supported chains and notes the need for token addresses, which are important behavioral constraints. It does not detail post-confirmation steps or return values, but the addition of confirmation-gating goes beyond the annotation.

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 concise sentences, front-loaded with the action and resource, followed by supported chains and a required prerequisite. Every sentence carries essential information with no redundancy or fluff.

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?

For a write operation with five parameters and no output schema, the description covers the core purpose, supported chains, prerequisite token addresses, and confirmation-gated behavior. It lacks details about return values or the broader Orbs swap workflow, but the given information is sufficient for an agent to select and invoke the tool correctly. The schema and annotations fill in additional details.

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?

The input schema covers all five parameters with clear descriptions, achieving 100% coverage. The description adds meaningful context by stating that token addresses are required and pointing to resolve_token for obtaining them, which clarifies the expected format for fromToken and toToken. This elevates it above the baseline.

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 'Execute a same-chain swap via Orbs Liquidity Hub' with a specific verb and resource. It distinguishes from sibling tools like orbs_place_twap or orbs_prepare_swap_intent by specifying same-chain swap and listing supported chains. The phrase 'write, confirmation-gated' also indicates the nature of the operation.

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 gives clear context for when to use this tool: for same-chain swaps on specific chains, with token addresses as input. It explicitly directs the user to 'use resolve_token first' to obtain token addresses, which is a valuable usage prerequisite. However, it does not explicitly name alternatives like orbs_place_twap for TWAP or lifi_execute_bridge for cross-chain, so it falls short of full guidance.

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/Apegurus/web3agent'

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