Read any contract function on Base and get the decoded result
contract_callCall any read-only (view/pure) function on a Base contract and get the decoded answer. Give the function as a signature like balanceOf(address) returns (uint256) plus args, or raw 0x calldata. Supports address, bool, uint/int, bytesN, string, bytes and arrays, an optional historical block, and plain revert reasons. Raw return data is always included. Not charged for invalid input, reverted calls, or when Base can't be reached. Paid via x402; see list_prices.
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": {
"contract": "<contract>"
},
"name": "contract_call"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | Arguments in order (big numbers as strings; arrays as lists). | |
| data | No | Optional instead of function: raw 0x calldata. | |
| block | No | Optional: "latest" (default) or a block number. | |
| returns | No | Optional: return types if not in the signature, e.g. "uint112,uint112,uint32". | |
| contract | Yes | Contract 0x address on Base. | |
| function | No | Function signature, e.g. "balanceOf(address) returns (uint256)". |