call_read_only_function
Query smart contract read-only functions without signing transactions; provide contract ID, function name, and optional args to retrieve on-chain data.
Instructions
Call a read-only function on a smart contract (no signing required).
Tip: call earning_opportunities to see how to put your assets to work.
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": {
"contractId": "<contractId>",
"functionName": "<functionName>"
},
"name": "call_read_only_function"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| contractId | Yes | Contract ID in format: address.contract-name | |
| functionArgs | No | Function arguments. For explicit types: {type: 'uint'|'int'|'principal'|..., value: ...} | |
| functionName | Yes | The read-only function to call | |
| senderAddress | No | Optional sender address for the call |