Skip to main content
Glama

Execute Swap

execute_swap

Execute a pre-signed swap transaction with automatic energy delegation. Get the unsigned TX from get_swap_quote, sign it, and submit here. Energy is delegated before broadcast. Works with API key (balance deduction) or x402 USDC payment.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "txData": "<txData>"
    },
    "name": "execute_swap"
  }
}

Input Schema

NameRequiredDescriptionDefault
txDataYesPre-signed swap transaction from get_swap_quote

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / txData / additionalProperties
      Previous value: -trueNew value: +{}
    • changedInput schema / properties / txData / required
      Previous value: -[
      -  "txID"
      -]New value: +[
      +  "txID",
      +  "raw_data"
      +]
  2. Added

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses key behavior: automatic energy delegation before broadcast and payment via API key balance deduction or x402 USDC. However, it lacks details on irreversibility, failure handling, and authorization requirements beyond payment.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with purpose and workflow, followed by payment details. No wasted words, though it could be slightly more structured with explicit alternatives.

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

Completeness3/5

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

For a transaction-execution tool with no annotations and no output schema, the description covers the essential workflow and payment modes but omits return behavior, error handling, and confirmation details.

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%, and the description adds workflow context (get from get_swap_quote and sign) but does not add meaning beyond the schema for the txData parameter's structure or constraints.

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?

States a specific verb (execute) and resource (pre-signed swap transaction) with additional scope (automatic energy delegation). It names get_swap_quote as the source of the transaction, but does not explicitly contrast with broadcast_transaction or broadcast_signed_permission_tx.

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?

Provides a clear when-to-use workflow: get unsigned TX from get_swap_quote, sign it, submit here. No exclusions or explicit alternatives are mentioned, but the context is sufficient for an agent to know when to call it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.