Skip to main content
Glama
Jesse-pink-lab

ICP Control Plane MCP Server

icp_upgrade_canister

Upgrade an ICP canister with preflight checks, preserving state by default. Prevent data loss during code updates.

Instructions

Safely upgrade a canister with preflight checks. This tool ALWAYS uses upgrade mode by default to preserve state. Use icp_install_code directly only if you need reinstall.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
notesNoRelease notes for tracking
wasm_pathYesPath to the WASM file
canister_idYesThe canister ID to upgrade
project_pathNoProject path for release tracking
skip_preflightNoSkip preflight checks (NOT RECOMMENDED)
force_reinstallNoForce reinstall mode (DANGEROUS - wipes all state)
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden of disclosure. It clearly mentions that the tool 'ALWAYS uses upgrade mode by default' and includes preflight checks, which conveys its safe default behavior. However, it does not mention the existence of dangerous flags like skip_preflight or force_reinstall (though the schema does), and the phrase 'only if you need reinstall' could be seen as hinting that reinstall is not this tool's purpose despite the schema allowing it. This is a minor gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is only two sentences, front-loaded with the core purpose ('Safely upgrade a canister') and immediately followed by the key default behavior and alternative tool. Every word earns its place, with no fluff or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with six parameters and no output schema, the description provides enough context for an agent to understand the tool's role, its safe-by-default nature, and its relationship to icp_install_code. It does not delve into failure modes or post-upgrade behavior, but that is not necessary for a basic selection decision. It could arguably mention that preflight checks are controlled by the skip_preflight parameter, but the schema already covers that.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already explains all six parameters. The description adds no additional parameter-specific information, maintaining the baseline score of 3. It does not explain how parameters like skip_preflight or force_reinstall interact with the tool's stated safe default.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Safely upgrade a canister with preflight checks.' It specifies the action (upgrade), the resource (canister), and a key differentiator (preflight checks, preserving state). It also distinguishes from the sibling tool icp_install_code by noting that the latter is for reinstall.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit guidance: 'Use icp_install_code directly only if you need reinstall.' This directly addresses when to use an alternative. The emphasis on upgrade mode and preserving state also implies when this tool is preferred over a reinstall approach.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Jesse-pink-lab/icp-control-plane-mcp-dist'

If you have feedback or need assistance with the MCP directory API, please join our Discord server