read_contract
Call view or pure smart contract functions on Kaia to retrieve decoded, readable results without changing state. Provide contract address, function name, and ABI.
Instructions
Read a view/pure contract function (no state change). Requires contract address, function name, and ABI (JSON string or array). Use get_contract_abi first if you do not have the ABI. Returns decoded result as readable text.
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": {
"contractAddress": "<contractAddress>",
"functionName": "<functionName>",
"abi": "<abi>"
},
"name": "read_contract"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| abi | Yes | ABI as JSON string or array. If missing, get_contract_abi can be called first to fetch it. | |
| args | No | Optional array of arguments for the function (in order) | |
| network | No | mainnet or kairos (default: mainnet) | |
| functionName | Yes | Name of the function to call | |
| contractAddress | Yes | Contract address (0x...) |