Repository navigation
feat: every tool tells MCP clients whether it reads, changes or destroys - #100
Conversation
…view readOnlyHint, destructiveHint, idempotentHint and openWorldHint for all 57 tools, kept in one table (src/tool-annotations.ts) and applied when tools are listed. A test fails if any listed tool lacks them or the table names a tool that is not listed.
…review Slicing, STL edits and settings extraction replace an earlier output of the same name; the bridge connect probe writes its configuration and certificates; counterpart_print_route replaces .env values; the legacy Blender bridge does not preserve the scene. Remote slicing is a new job each call.
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…ly or additive @codex review Camera start/stop change the stream all viewers share. print_3mf and its siblings may auto-slice, replacing an earlier output. bambu_network_call allows only reads but sets up the bridge agent. A tool missing from the table now gets the most cautious hints, and the test pins the exact read-only set.
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c6cddc485a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
MCP clients can't tell which of this server's tools only read and which move, heat, print, delete or overwrite. Only
inspect_print_fileand two Counterpart tools had annotations, and two of those were incomplete. Counterpart's remote/v1/mcpendpoint will give each device scopes (read, control, print, design) based on these hints, so they have to be right.Every one of the 57 tools now declares all four MCP hints (
readOnlyHint,destructiveHint,idempotentHint,openWorldHint). Each value comes from reading what the tool's handler actually does. They live in one table,src/tool-annotations.ts, which is applied when tools are listed.tests/tool-annotations.test.mjsfails if a listed tool has no annotations or the table names a tool that isn't listed. It pins the exact read-only set (the future read scope), so adding a read-only tool means changing the test on purpose. A tool missing from the table is listed with the most cautious hints. It also fails if a read-only tool is marked destructive or non-idempotent, and it pins the hints the scopes depend on. The hints don't gate anything: every print and control still runs the server's own checks.Judgment calls
start_print*,upload_filewithprint: true). It adds a job and removes nothing, and the printer runs its own checks.print_3mf,print_3mf_bambu_networkandprint_collar_charmare marked destructive only because they may auto-slice, which replaces an earlier slice output (found in review). No print call is idempotent: a repeat starts another job. Print scope should be keyed by tool, not bydestructiveHint.cancel_print(the job can't be resumed),skip_objects,delete_printer_file,clear_hms_errors,x2d_native_control(replaces AMS metadata or the calibration selection), and the rawblender_mcp_callandfusion_mcp_call.bambu_network_callallows only handshake and sign-in reads, but by default it sets up the bridge agent, which writes config and certificates, so it is marked like the status probe.get_slice_settings, which replace an earlier output of the same name in the server's temp folder, andsave_template. It also coverscounterpart_print_route, which replaces.envvalues, and thebambu_network_bridge_statusprobe, becauseconnect: truewrites bridge config and certificates.blender_mcp_edit_modelcounts too, since its legacy bridge doesn't preserve the scene.camera_snapshotis not read-only.save_pathoverwrites a file. A remote read scope that wants snapshots should dropsave_path.camera_stream_start/camera_stream_stopare not read-only (found in review). They change the one stream every viewer of the printer shares, but send no printer commands. A read scope that needs live view must allowcamera_stream_startby name.camera_frameandblender_mcp_statusare read-only.fusion_mcp_statusis not read-only, becauselaunch: truestarts Fusion.openWorldHintis true for anything that reaches the printer, Bambu Cloud, a remote slicer (orca-slicer-api, which is also why slicing isn't idempotent), Blender, Fusion or Bambu Connect. It is false for local file tools andcounterpart_printer_info.No version bump, because releases are on hold. The CHANGELOG entry is under
Unreleased.Proof: full
npm teston the head commit: 1036 tests, 1032 pass, 0 fail. The 4 skips need Linux, a C++ compiler or a real FULU host. The new test also lists the tools through a real stdio MCP client.Council review
Rounds: 2
Round 1 changes: camera stream start/stop are no longer read-only; auto-slicing print tools are destructive; the
bambu_network_callrationale is corrected; make-3MF and Fusion export are idempotent; missing tools get cautious hints; and the read-only set is pinned. Round 2 approved, and its two test nits are applied.Reviewed with sol-loop: 2 rounds with gpt-6.1-sol. Sol verdict: approved