Skip to content

fix(mcp): stop DEFAULT_INSTRUCTIONS advertising a universal dry_run#91

Merged
ABB65 merged 1 commit into
mainfrom
fix/mcp-server-instructions
Jul 17, 2026
Merged

fix(mcp): stop DEFAULT_INSTRUCTIONS advertising a universal dry_run#91
ABB65 merged 1 commit into
mainfrom
fix/mcp-server-instructions

Conversation

@ABB65

@ABB65 ABB65 commented Jul 17, 2026

Copy link
Copy Markdown
Member

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_run exists only on contentrain_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_INSTRUCTIONS now states the actual safety model:

Start with contentrain_status; describe_format before creating, describe before editing. Every write lands on an isolated cr/* branch and content_save validates before committing. Destructive tools require confirm:true; preview contentrain_apply with dry_run:true first.

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 --noEmit clean · tests/server/tool-availability.test.ts 12/12 (covers the length budget and instruction passthrough/omission).

🤖 Generated with Claude Code

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.
@netlify

netlify Bot commented Jul 17, 2026

Copy link
Copy Markdown

Deploy Preview for contentrain-ai ready!

Name Link
🔨 Latest commit c189b6f
🔍 Latest deploy log https://app.netlify.com/projects/contentrain-ai/deploys/6a5a6a3ea6c8d3000801e442
😎 Deploy Preview https://deploy-preview-91--contentrain-ai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ABB65
ABB65 merged commit 67ffc9b into main Jul 17, 2026
6 checks passed
@ABB65
ABB65 deleted the fix/mcp-server-instructions branch July 17, 2026 17:52
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant