call_contract
Execute smart contract functions on blockchain networks to read data, modify state, or transfer value using contract ABI, address, and function parameters.
Instructions
Call a function in the solidity contract.
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": {
"abi": "<abi>",
"networkName": "<networkName>",
"contractAddress": "<contractAddress>",
"functionName": "<functionName>"
},
"name": "call_contract"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| abi | Yes | Contract function ABI part, only the relevant function. | |
| networkName | Yes | Blockchain network name. | |
| contractAddress | Yes | Contract address, must start with '0x' and be 40 hex characters long. | |
| functionName | Yes | Function name. | |
| args | No | Function arguments. Make sure no comments are included. | |
| value | No | Transfer native token value when calling payable function. When native token decimal is 18, input 0.001 for 0.001 ETH (1000000000000000 wei). Be careful not to add additional code comments |