Skip to content

fix(deploy): drop some tools and fix descriptions - #266

Merged
aterga merged 4 commits into
mainfrom
rk/try-less-tools
Nov 19, 2026
Merged

aterga merged 4 commits into
mainfrom
rk/try-less-tools

Conversation

@raymondk

@raymondk raymondk commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Removes two tools from the deploy group, icp_cycles_balance and icp_deploy_guide, so the deploy surface is just icp_deploy_bundle, plus icp_deploy_upload on the hosted server. With the guide tool gone, icp_deploy_bundle's own description now carries the steps.

Tools removed

  • icp_cycles_balance (deploy group copy). Also removes the code only it used: cli_identity and the CyclesBalance / cycles_balance_of imports. The core copy in tools.rs stays, but it's in the deferred protocol half, so no server lists a balance tool now.
  • icp_deploy_guide and its DeployGuideOutput. The guide is still served as the skill://deploy-with-mcp resource.

Descriptions

  • icp_deploy_bundle is rewritten so an agent can deploy correctly without reading the skill resource:
    • It opens with "Deploy an icp project (the user's app)" and says to use it when the user asks to deploy their app.
    • It lists the steps: bundle with icp project bundle, hand the bundle over (upload on a server that lists icp_deploy_upload, bundle_path otherwise), call with the contents of .icp/data/mappings/<environment>.ids.json, then write the returned canister_ids back to that file.
    • It warns that skipping the write-back makes the next deploy create new canisters, including after a failed or interrupted deploy.
    • It takes over the cycles guidance from the removed balance tool (2T per canister by default; confirm with the user before creating any).
  • icp_deploy_upload goes back to its ticket/curl description. An earlier commit on this branch had given it the deploy tool's text by mistake.
  • The server instructions name the mapping file and say that skipping the write-back creates new canisters. They now point to skill://deploy-with-mcp instead of icp_deploy_guide.

Docs and tests

  • README.md, crates/imcp2-local/README.md and the deploy skill no longer mention the removed tools.
  • Tests updated:
    • The deploy router has 2 tools.
    • The local server lists 13.
    • The hosted tool-list test no longer expects icp_cycles_balance.
    • The body-cap test now uses icp_deploy_upload as its target.

Testing

cargo test --workspace and cargo clippy --all-targets --workspace pass.

🤖 Generated with Claude Code

@raymondk
raymondk requested review from a team and a max review from Copilot November 19, 2026 19:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The deployment instructions can build the wrong environment and leave tools-only clients without recovery guidance for unknown outcomes, risking duplicate funded canisters.

2 open issues
What changed in this PR

This PR reduces the MCP deployment tool set and expands the remaining deployment instructions to guide agents through bundling and preserving canister mappings.

Changes:

  • Remove icp_cycles_balance and icp_deploy_guide from the deploy tool group, retaining the guide resource.
  • Expand deployment descriptions with bundle-transfer steps, creation confirmation, and mapping persistence.
  • Align documentation and hosted/local server tests with the reduced tool set.
File Description
src/​deploy.rs Update hosted tool-list and request-size tests.
README.md Remove references to the retired deploy helper tools.
crates/​imcp2-local/​src/​server.rs Adjust tool-count assertions and remove guide-tool checks.
crates/​imcp2-local/​README.md Align local deployment documentation with the remaining tools.
crates/​imcp2-core/​static/​skills/​deploy-with-mcp.md Remove balance-tool guidance from prerequisites.
crates/​imcp2-core/​src/​deploy/​server.rs Clarify server instructions for saving canister mappings.
crates/​imcp2-core/​src/​deploy/​mod.rs Remove helper tools and supporting code; expand deployment instructions and update tests.

Review effort: Max

Comment thread crates/imcp2-core/src/deploy/mod.rs Resolved
Comment thread crates/imcp2-core/src/deploy/mod.rs Resolved
Comment thread crates/imcp2-core/src/deploy/mod.rs Resolved
Comment thread crates/imcp2-core/src/deploy/mod.rs Resolved
Co-authored-by: Arshavir Ter-Gabrielyan <[email protected]>
Copilot AI max review requested due to automatic review settings November 19, 2026 19:46
Users ask to deploy their app, not a bundle; the tool's description
already says it takes the bundle `icp project bundle` writes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The deployment instructions omit the canister ID mapping needed to prevent duplicate canisters on redeploy, assume unavailable local upload support, and lack the promised funding default and creation confirmation.

1 open issue
2 resolved since last review

Review effort: Max

Comment thread crates/imcp2-core/src/deploy/mod.rs Resolved
Copilot AI max review requested due to automatic review settings November 19, 2026 19:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Renaming the published tool to icp_deploy without an alias breaks existing clients calling icp_deploy_bundle on both servers.

2 open issues

Review effort: Max

Comment thread crates/imcp2-core/src/deploy/mod.rs Resolved
aterga
aterga previously approved these changes Nov 19, 2026
Copilot AI max review requested due to automatic review settings November 19, 2026 20:07
@aterga
aterga merged commit 614f16b into main Nov 19, 2026
16 of 17 checks passed
@aterga aterga mentioned this pull request Nov 19, 2026
6 of 8 tasks

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The missing BEFORE_THE_BUNDLE anchor breaks server-specific bundle instructions, directs local-server users to an unavailable upload tool, and causes an existing test to fail.

1 open issue
2 resolved since last review

Review effort: Max


#[tool(
description = "Deploy an icp project bundle (the .tar.gz that `icp project bundle` writes) to the Internet Computer as the user, running every phase of `icp deploy`. Pass the canister_ids a previous deploy returned to upgrade rather than create anew. The call lasts as long as the deploy and reports each phase as it completes, as a progress notification (send a progressToken) and a log message; cancelling the call interrupts the deploy at its next step. Returns the status, the resulting canister-id mapping, and a log of each phase; on failure or interruption the mapping still holds every canister that was created.",
description = "Deploy an ICP app to the Internet Computer. The steps: (1) bundle the project in the user's environment with `icp project bundle --output <file>.tar.gz`; (2) upload that bundle via icp_deploy_upload; (3) save the `canister_ids` this tool returns, unchanged, into `.icp/data/mappings/<environment>.ids.json` file of the project. Skipping step 3 makes the next deploy create a new set of canisters instead of upgrading these. The call lasts as long as the deploy and reports each phase as it completes, as a progress notification (send a progressToken) and a log message; cancelling the call interrupts the deploy at its next step. Returns the status, the resulting canister-id mapping, and a log of each phase; on failure or interruption the mapping still holds every canister that was created, so write it back then too. The resource `skill://deploy-with-mcp` has the full guide.",
aterga pushed a commit that referenced this pull request Nov 19, 2026
#266 rewrote the icp_deploy description and hard-coded its step (2) as
"upload that bundle via icp_deploy_upload". The local server does not list
that tool: it takes the bundle as `bundle_path`. The sentence that
IcDeployTools::tools() put in per server was anchored on text the rewrite
removed, so it silently stopped being put in, and
a_server_lists_the_bundle_argument_it_takes has failed on main since.

Step (2) is now the anchor. The description says "hand that bundle to this
tool", and each server replaces that with its own way in: upload via
`icp_deploy_upload` on a server with an upload store, the bundle's absolute
path as `bundle_path` on one without. The hosted server's text is what #266
wrote, with the tool name in backticks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VP2vTGJNrpdaVxN1aY8XSX
aterga pushed a commit that referenced this pull request Nov 19, 2026
Review asked for the description's text back. The tool's description in
the source says step (2) as #266 wrote it, "upload that bundle via
icp_deploy_upload", and the hosted server lists it unchanged. Only a
server without an upload store, imcp2-local, puts "pass that bundle's
absolute path as `bundle_path`" in its place, since it lists no
icp_deploy_upload.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VP2vTGJNrpdaVxN1aY8XSX
@raymondk raymondk mentioned this pull request Nov 19, 2026
6 of 8 tasks
aterga pushed a commit that referenced this pull request Nov 19, 2026
* Bump crates to 0.7.0

All three crates share one version. A minor bump: since 0.6.1 the server
gained the deploy tools (bundle host, upload store, pipeline, MCP tools,
remote serving and metrics, #261, #265, #266), the cap on the MCP request
body behind the bearer gate (#241), vetted-connector branding surfaced to
Internet Identity (#200), and get_canister_candid now carries the interface
text in its structured output (#229).

The rc-0.7.0 candidate needs this on main first: deploy-candidate.yml and
publish-crate.yml both refuse a tag whose version disagrees with every
Cargo.toml.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VP2vTGJNrpdaVxN1aY8XSX

* Deploy tools: say per server how to hand icp_deploy the bundle again

#266 rewrote the icp_deploy description and hard-coded its step (2) as
"upload that bundle via icp_deploy_upload". The local server does not list
that tool: it takes the bundle as `bundle_path`. The sentence that
IcDeployTools::tools() put in per server was anchored on text the rewrite
removed, so it silently stopped being put in, and
a_server_lists_the_bundle_argument_it_takes has failed on main since.

Step (2) is now the anchor. The description says "hand that bundle to this
tool", and each server replaces that with its own way in: upload via
`icp_deploy_upload` on a server with an upload store, the bundle's absolute
path as `bundle_path` on one without. The hosted server's text is what #266
wrote, with the tool name in backticks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VP2vTGJNrpdaVxN1aY8XSX

* README: depend on imcp2 0.7

`imcp2 = "0.6"` matches 0.6.x only, and the README ships in the crate, so a
reader of 0.7.0's page would be told to depend on the release before it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VP2vTGJNrpdaVxN1aY8XSX

* Deploy tools: keep the description's step (2) as written

Review asked for the description's text back. The tool's description in
the source says step (2) as #266 wrote it, "upload that bundle via
icp_deploy_upload", and the hosted server lists it unchanged. Only a
server without an upload store, imcp2-local, puts "pass that bundle's
absolute path as `bundle_path`" in its place, since it lists no
icp_deploy_upload.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VP2vTGJNrpdaVxN1aY8XSX

---------

Co-authored-by: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants