Repository navigation
Deploy tools: answer logging/setLevel, and shorten the icp_deploy_bundle description - #265
Merged
Merged
Conversation
The deploy handler declares the MCP logging capability, since a deploy sent no progress token reports its phases as log messages, but did not handle `logging/setLevel`: a client that sent it was told there is no such method. `WithDeploy` now takes the request, and `LocalServer` passes it on. The deploy tools log at one level, `info`, so the level decides whether they log at all: asked for messages from a level above `info` only, a deploy without a progress token sends none (its outcome still carries every line), and a level at or below `info` turns them back on. Progress under a token is the request's own asking and is sent whatever the level. The level is the handler's. On imcp2-local that is the connection. The hosted transport is stateless, a handler per request, so a level set there is accepted and applies to no later call. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_01VP2vTFUYW9ZKb1Rjv176Za
sea-snake
previously approved these changes
Nov 19, 2026
…undle's way in per server The description of `icp_deploy_bundle` no longer lists the phases of a deploy or says which argument carries the bundle and what the environment is called: the arguments say that themselves. As suggested in review of #261. It keeps one sentence on how to hand the bundle over, and that sentence is the server's own, put in where the tool list is already fitted to the server: one with an upload store says to upload the bundle with `icp_deploy_upload`; one without says to pass its path as `bundle_path`. One description for both would name, on the local server, a tool that server does not list. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_01VP2vTFUYW9ZKb1Rjv176Za
aterga
force-pushed
the
deploy-logging-set-level
branch
from
November 19, 2026 19:22
14448db to
d832e0e
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Stdio deployments without progress tokens snapshot the logging level, so runtime logging/setLevel changes do not stop or resume their log notifications as expected.
1 open issue
What changed in this PR
Adds logging/setLevel handling to the deploy MCP tools, closing the logging-capability gap accepted in #261.
Changes:
- Handles level requests in
WithDeployand forwards them from the local server. - Filters tokenless deploy log notifications while preserving progress notifications and complete logs in deploy results.
- Adds level-mapping, local-client, and hosted-router tests.
| File | Description |
|---|---|
src/deploy.rs |
Tests that the hosted endpoint accepts logging/setLevel. |
crates/imcp2-local/src/server.rs |
Forwards level requests and tests them over an MCP connection. |
crates/imcp2-core/src/deploy/server.rs |
Stores the handler’s logging preference and passes it to deploy calls. |
crates/imcp2-core/src/deploy/mod.rs |
Adds notification-channel selection, level filtering, and unit tests. |
Review effort: Max
The level a client sets with `logging/setLevel` was read once, as a deploy call began, so one set while a deploy was running changed nothing for it: a deploy that began logging went on to its end, and one that began muted could not be heard again. The handler's flag is now shared with the deploy calls running, which read it for each line they send. Progress under a progress token is as before, whatever the level. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_01VP2vTFUYW9ZKb1Rjv176Za
sea-snake
approved these changes
Nov 19, 2026
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Two follow-ups to #261, on top of
mainnow that it has merged.1. Answer
logging/setLevelThe deploy handler declares the MCP
loggingcapability and did not handlelogging/setLevel, so a client that sent it gotmethod not found. #261 accepted that gap for a follow-up.WithDeployanswerslogging/setLevel, andLocalServerpasses the request on to it.info, so the level decides whether they log at all. A client that asks for messages from a level aboveinfoonly is sent none by a deploy without a progress token; a level at or belowinfoturns them back on. The deploy's answer carries every line either way.The level belongs to the handler. On
imcp2-local(stdio) that is the connection: it applies from the moment it is set, to later deploy calls and to one already running. The hosted transport is stateless, with a handler per request, so a level set there is accepted and applies to no later call.2. A shorter description for
icp_deploy_bundleAs suggested in review of #261. The description no longer lists the phases of a deploy, or says which argument carries the bundle and what the environment is called: the arguments describe themselves.
It keeps one sentence on how to hand the bundle over, and that sentence is per server, put in where the tool list is already fitted to the server:
icp_deploy_upload."imcp2-local): "Pass that bundle's absolute path asbundle_path."One description for both would tell an agent on the local server to use a tool that server does not list.
Tests
imcp2-local, with a real MCP client over a pipe:logging/setLevelis answered, and levels above and belowinfoturn the messages off and on.logging/setLevelgets a result, not an error.https://claude.ai/code/session_01VP2vTFUYW9ZKb1Rjv176Za
Generated by Claude Code