contract-query
Execute read-only functions on smart contracts to retrieve data without altering the blockchain state. Specify the contract address, network, and query message for precise results.
Instructions
Query a smart contract by executing a read-only function
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>",
"queryMsg": "<queryMsg>",
"networkName": "<networkName>"
},
"name": "contract-query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| contractAddress | Yes | Address of the smart contract to query | |
| networkName | Yes | Name of the network to use - must first check what networks are available through the networks resource | |
| queryMsg | Yes | The query message to send to the contract as a JSON object |