evm_write_contract
Execute state-changing smart contract functions with ABI auto-resolution, registered label, or custom JSON. Confirmation-gated for safety.
Instructions
Execute a state-changing contract function. Provide abiLabel (from evm_register_abi), abiJson, or let the tool auto-resolve. Confirmation-gated.
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>"
},
"name": "evm_write_contract"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | Function arguments as strings | |
| value | No | Optional native amount in ether units | |
| abiJson | No | Optional ABI JSON string | |
| chainId | No | Chain ID (defaults to runtime config) | |
| abiLabel | No | Label of a registered ABI (from evm_register_abi) | |
| functionName | Yes | State-changing function name | |
| contractAddress | Yes | Contract address |