Skip to main content
Glama

Simulate an unsigned swap transaction

simulate_swap_tx
Read-only

Dry-runs the UNSIGNED transaction returned by build_swap_tx on the MultiversX gateway (checkSignature=false). The transaction is re-verified first and refused unless it is exactly what build_swap_tx produces (receiver, function, token, amount, minOut, chainID, gas caps). Returns status, estimated gas, a failure reason, and the expected received amount. Simulation does not guarantee execution.

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": {
      "transaction": "<transaction>",
      "minOut": "<minOut>"
    },
    "name": "simulate_swap_tx"
  }
}

Input Schema

NameRequiredDescriptionDefault
minOutYesRequired: minOut.raw from build_swap_tx (the minimum you accepted)
networkNoMultiversX network (default mainnet; devnet only if configured)mainnet
tokenInNoOptional check: data.tokenIn.id from build_swap_tx
amountInNoOptional check: amountIn.decimal from build_swap_tx
tokenOutNoOptional check: data.tokenOut.id from build_swap_tx
transactionYesThe `transaction` object from build_swap_tx, unchanged

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond readOnlyHint and openWorldHint, the description discloses concrete behavior: checkSignature=false, re-verification against build_swap_tx fields, refusal on mismatch, returned status/gas/failure/expected amount, and the caveat that simulation does not guarantee execution. This is exactly the extra behavioral context annotations cannot provide.

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 three sentences are front-loaded with purpose, then validation behavior, then return/caveat information. Every sentence carries relevant information and there is no filler.

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?

For a simulation tool with no output schema, the description explains what is returned and the important limitation of simulation. Combined with complete schema descriptions and annotations, an agent has enough to call it correctly and interpret the result.

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%, so the schema already explains parameters in detail. The description adds important cross-tool semantics: the transaction object must be unchanged from build_swap_tx and is validated against receiver, function, token, amount, minOut, chainID, and gas caps, which helps the agent understand why the parameter is shaped that way.

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 names a specific action ("Dry-runs") and resource ("UNSIGNED transaction returned by build_swap_tx") and distinguishes it from the builder sibling. It also states the gateway and checkSignature=false, so an agent knows exactly what operation this represents.

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?

It clearly establishes usage context: the transaction must come from build_swap_tx and must be exactly what that tool produced, otherwise the call is refused. It stops short of explicitly saying when to use this versus tx_status or when not to use it, but the pre-signing context is strongly implied.

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.

Resources