Skip to main content
Glama

transaction-preview

Read-only

Preview any transaction that isn't a plain buy or sell of a token (a claim, an approval, a contract call) before signing it; for token swaps use simulate-trade. Execute an EOA transaction on a disposable fork of BNB Smart Chain, Ethereum, Base or Arc. Supply target, calldata, optional native-coin value and up to ten ERC-20 assets to track. Returns receipt status, native-coin balance delta including gas, requested token deltas and direct approve allowance reads when available. Other assets, internal approvals and signatures are not inventoried; nothing is broadcast live. Costs $0.02 per successful call in USDC on Base, Polygon, Arbitrum, Avalanche, BNB Smart Chain (USDT) or Solana, paid with x402 in the call's _meta; failed calls are free.

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": {
      "wallet": "<wallet>",
      "to": "<to>",
      "data": "<data>"
    },
    "name": "transaction-preview"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesTransaction target
gasNoOptional gas limit, 21000 to 3000000
dataYesTransaction calldata, 0x for native transfer
chainNobsc (BNB Smart Chain, the default), eth (Ethereum), base (Base) or arc (Arc)
valueNoNative coin wei (BNB or ETH), default zero
tokensNoOptional comma-separated ERC-20 assets to track, maximum ten
walletYesSending EOA

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / chain / description
      Previous value: -"bsc (BNB Smart Chain, the default), eth (Ethereum) or base (Base)"New value: +"bsc (BNB Smart Chain, the default), eth (Ethereum), base (Base) or arc (Arc)"
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Goes well beyond the annotations: it discloses that execution happens on a disposable fork, that nothing is broadcast live (reconciling the readOnlyHint=true annotation with the word 'Execute'), and it names the coverage limits (other assets, internal approvals, signatures not inventoried). It also discloses the pricing model, payment rails, x402 _meta mechanism, and that failed calls are free — a notable behavioral trait not present in annotations. Slight deduction because it does not state latency or whether fork state is reusable across calls.

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?

Front-loaded with the routing decision, then scope, then output, then limits, then cost — a sensible order. It is dense and the final pricing sentence is long, but each clause carries information an agent needs; no filler sentences.

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?

With no output schema, the description compensates by enumerating the return payload (receipt status, native balance delta including gas, token deltas, allowance reads) and by stating what is not returned. Combined with the cost and no-live-broadcast disclosures, an agent has everything needed to call it and interpret results.

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 coverage is 100%, so every parameter is already documented, and the description mostly restates them (target, calldata, optional native value, up to ten ERC-20 assets). The only added value is the framing of 'tokens' as assets to track rather than transfer, which is a small semantic gain. Baseline 3 applies when the schema does the heavy lifting.

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?

States a specific verb and resource ('preview any transaction that isn't a plain buy or sell'), enumerates the covered cases (claim, approval, contract call), and explicitly names the sibling tool to use instead for swaps (simulate-trade). An agent can distinguish this from simulate-trade without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit when-to-use rule (non-swap transactions before signing) plus an explicit routing rule to a named alternative for token swaps. No ambiguity about which tool handles which transaction class.

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