fix(mcp): stop DEFAULT_INSTRUCTIONS advertising a universal dry_run#91
Merged
Conversation
The server instructions told clients to preview every write with dry_run:true — but dry_run exists only on contentrain_apply. On other write tools the unknown key is stripped by the Zod schema, so an agent following the instructions performed a real write while believing it had previewed. The text now states the actual safety model: isolated cr/* branches, the content_save validation gate, confirm:true on destructive tools, and dry_run as the apply preview. 507 chars, under the 512 client-UI budget asserted by the test. oxlint 0/0, tsc clean, tool-availability suite 12/12.
✅ Deploy Preview for contentrain-ai ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The MCP server instructions — the guidance string every client receives at initialize — told agents to "preview writes with dry_run:true, review the plan, then re-run with dry_run:false." But
dry_runexists only oncontentrain_apply; no other write tool has it in its schema.The failure mode is worse than a stale doc: on
content_save/model_save/etc. the unknown key is silently stripped by Zod, so an agent following its own server's instructions performs a real, committed write while believing it previewed. The docs site stopped making this claim in #90; this fixes the source of it.Change
DEFAULT_INSTRUCTIONSnow states the actual safety model:507 characters — under the 512 budget the test asserts (client UIs truncate longer strings). No tool behavior changes; patch changeset included.
Quality gates
oxlint 0/0 ·
tsc --noEmitclean ·tests/server/tool-availability.test.ts12/12 (covers the length budget and instruction passthrough/omission).🤖 Generated with Claude Code