call_canister
Call public methods on ICP canisters by providing Candid type definitions for arguments and returns. Supports both query and update operations.
Instructions
Call any public method on an ICP canister. Specify argument and return types using Candid type strings.
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>",
"method_name": "<method_name>"
},
"name": "call_canister"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | Arguments in JSON format | |
| is_query | No | Set to true for read-only query calls | |
| arg_types | No | Candid types for args (e.g., ["text", "nat"]) | |
| ret_types | No | Expected return types (e.g., ["bool"]) | |
| canister_id | Yes | The target canister Principal (e.g., "rrkah-fqaaa-aaaaa-aaaaq-cai") | |
| method_name | Yes | The method to call on the canister |