Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .changeset/server-instructions-dry-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
"@contentrain/mcp": patch
---

fix(mcp): stop DEFAULT_INSTRUCTIONS advertising a universal dry_run

The MCP server instructions told every client to "preview writes with
dry_run:true, then re-run with dry_run:false" — but `dry_run` exists only on
`contentrain_apply`. On every other write tool the unknown key is stripped by
the schema, so an agent following the instructions performed a real write
while believing it had previewed. The instructions now state the actual
safety model: writes land on isolated `cr/*` branches, `content_save`
validates before committing, destructive tools require `confirm:true`, and
`dry_run` is the `contentrain_apply` preview. Still under the 512-character
client-UI budget; no tool behavior changes.
12 changes: 6 additions & 6 deletions packages/mcp/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ import packageJson from '../package.json' with { type: 'json' }
*/
export const DEFAULT_INSTRUCTIONS
= 'Contentrain is git-native content governance: models define structure; '
+ 'content is canonical JSON/Markdown on a dedicated branch. Call '
+ 'contentrain_describe_format before creating models or content. Preview '
+ 'writes with dry_run:true, review the plan, then re-run with '
+ 'dry_run:false. Start with contentrain_status for models, locales, and '
+ 'workflow; inspect a model with contentrain_describe before editing its '
+ 'entries. Tools are deterministic infrastructure — content decisions '
+ 'content is canonical JSON/Markdown on a dedicated branch. Start with '
+ 'contentrain_status; call contentrain_describe_format before creating '
+ 'models or content, and contentrain_describe before editing a model\'s '
+ 'entries. 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. Content decisions '
+ 'stay with the agent.'

export interface CreateServerOptions {
Expand Down
Loading