Skip to main content
Glama

execute_onchain_intent

Destructive

Simulates and executes a gasless, sponsored Web3 transaction on Base L2 (e.g. token swaps, transfers) against operator-allowlisted targets. Simulates before broadcasting: Tenderly when the operator has it enabled, otherwise an RPC gas estimate plus a USDC amount cap. Requires an API key. When the operator charges for execution, the first call returns the x402 USDC payment requirements; sign that EIP-3009 authorization locally (never send a private key) and call again with paymentSignature. Payment settles only after the target and simulation checks pass, and only for the exact price.

Input Schema

NameRequiredDescriptionDefault
agentIdNoAgent identifier for session scoping.
calldataYesHex-encoded transaction calldata.
valueWeiNoNative token value in Wei (defaults to '0').
fromAddressYesThe Safe Smart Account address performing the action.
sessionKeyIdNoOptional gateway-issued session key id to enforce spend/target caps.
targetAddressYesTarget contract or token recipient address.
paymentSignatureNoBase64 PAYMENT-SIGNATURE: { signature, payload: { from, to, value, validAfter, validBefore, nonce } } for the EIP-3009 USDC TransferWithAuthorization in the payment requirements. Single-use and exact-price; signed by your own wallet.
maxAllowedDrainUSDNoMaximum allowable wallet drain in USD. Checked against Tenderly balance changes; an RPC-only simulation reports none.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / paymentSignature
      Added value: +{
      +  "description": "Base64 PAYMENT-SIGNATURE: { signature, payload: { from, to, value, validAfter, validBefore, nonce } } for the EIP-3009 USDC TransferWithAuthorization in the payment requirements. Single-use and exact-price; signed by your own wallet.",
      +  "type": "string"
      +}
  2. Changed2 schema fields changed
    • changedInput schema / properties / maxAllowedDrainUSD / description
      Previous value: -"Maximum allowable wallet drain in USD during simulation guardrail check."New value: +"Maximum allowable wallet drain in USD. Checked against Tenderly balance changes; an RPC-only simulation reports none."
    • changedInput schema / properties / sessionKeyId / description
      Previous value: -"Optional ERC-7579 session key id to enforce spend/target caps."New value: +"Optional gateway-issued session key id to enforce spend/target caps."
  3. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations (destructiveHint=true, openWorldHint=true, idempotentHint=false) by disclosing the simulation strategy and its fallback (Tenderly vs RPC gas estimate plus USDC cap), that settlement occurs only after target and simulation checks pass, that payment is exact-price and single-use, and the safety instruction never to send a private key. These are exactly the operational traits an agent cannot get from structured fields.

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?

Front-loads the action and target chain in the first clause, then layers simulation, auth, and payment mechanics in a logical order. Every sentence carries operational information; there is no filler despite the density.

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?

Covers authorization, simulation, payment, and safety completely for a destructive, open-world mutation tool with 8 params. The remaining gap is that no output schema exists and the description never says what a successful execution returns (transaction hash, receipt, simulated balance changes), leaving the agent to discover the response shape.

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 baseline is 3. The description adds workflow meaning that the schema alone does not: paymentSignature is only needed on the second call after the first call returns payment requirements, and the USDC cap semantics tie back to the simulation path. It does not explain sessionKeyId's cap-enforcement interaction with the payment flow in any depth.

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+resource ('Simulates and executes a gasless, sponsored Web3 transaction on Base L2') with concrete examples of intent types (token swaps, transfers) and scope constraints (operator-allowlisted targets). It does not name the sibling dry_run_simulation, so an agent must infer why it would pick this over that tool, but the purpose itself is unambiguous.

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?

Gives clear preconditions (API key required, operator-allowlisted target, payment when operator charges) and a procedural when-to-use path for the paid case: call once, receive x402 requirements, sign locally, call again with paymentSignature. It stops short of stating when to prefer dry_run_simulation or when to route through issue_session_key instead.

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.