agentPreflight
One call that pre-flights an onchain transaction for an agent: simulates the call for reverts, checks the sender wallet's native gas balance, and reads current Base gas — returning a single GO/NO_GO verdict with reasons. Replaces 3 separate calls (simulate + balances + gas-history) every agent runs before transacting. Matches: pre-transaction check, agent transaction guard, revert + balance + gas preflight, onchain go/no-go, safe-to-send checker, autonomous trade preflight.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "agentPreflight"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Target contract address of the transaction to simulate | |
| data | No | Calldata payload (hex) of the transaction to simulate | |
| from | No | Sender address used by the eth_call (defaults to wallet) | |
| chain | No | base or ethereum | base |
| wallet | No | Sender wallet — checks native gas balance and USDC |