aptos_view_function
Retrieve data from Aptos smart contracts by calling read-only view functions. Query on-chain state without modifying the blockchain.
Instructions
Call a view function (read-only)
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": {
"function": "<function>"
},
"name": "aptos_view_function"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| function | Yes | The function identifier (e.g., 0x1::coin::balance) | |
| arguments | No | Function arguments | |
| typeArguments | No | Type arguments |