call_contract
Execute a read-only smart contract call to retrieve raw on-chain data such as token balances, prices, and positions without spending gas or modifying state.
Instructions
Execute a read-only call against a smart contract (eth_call). Returns the raw hex result. Does not cost gas or modify state. Useful for reading on-chain data like token balances, prices, positions.
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": {
"chain_id": "<chain_id>",
"to": "<to>",
"data": "<data>"
},
"name": "call_contract"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Contract address | |
| data | Yes | ABI-encoded calldata (0x-prefixed hex) | |
| chain_id | Yes | Chain ID |