icp_install_code
Install, reinstall, or upgrade WASM code on a target canister using a local .wasm file, with optional Candid init arguments.
Instructions
Installs or upgrades WASM code in a canister. Reads WASM from local filesystem.
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": {
"canister_id": "<canister_id>",
"wasm_path": "<wasm_path>"
},
"name": "icp_install_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | Optional JSON arguments for canister init | |
| mode | No | Installation mode | install |
| arg_types | No | Candid types for init args | |
| wasm_path | Yes | Absolute or relative path to the .wasm file | |
| canister_id | Yes | The target canister Principal |