Problem
packages/mcp-exec/src/consts.ts still contains examples using the old discriminated union format (type: "command", type: "pipeline") from before PR #10 unified the schema to commands: [].
These stale examples are likely surfaced via .describe() or .meta() on the schema, which means Claude (and ToolSearch) sees the old format as example usage — even though the schema itself no longer accepts type.
Impact
- Claude uses examples to guide tool calls. Old examples → old format → validation errors on first attempt
- SDK caches
tools/list results per session, so the stale examples persist until session restart
- Discovered during mid-session MCP version switching test — Claude kept using
type: "command" because the examples told it to
Fix
Update all examples in consts.ts to use the unified commands: [] format. No type field.
Broader question
Should examples live in consts.ts at all, or should they be inline with the schema definitions (.describe() / .meta())? Centralised consts can drift from the schema they describe. Inline examples are co-located with the schema they reference — harder to forget to update.
🤖 Generated with Claude Code
Problem
packages/mcp-exec/src/consts.tsstill contains examples using the old discriminated union format (type: "command",type: "pipeline") from before PR #10 unified the schema tocommands: [].These stale examples are likely surfaced via
.describe()or.meta()on the schema, which means Claude (and ToolSearch) sees the old format as example usage — even though the schema itself no longer acceptstype.Impact
tools/listresults per session, so the stale examples persist until session restarttype: "command"because the examples told it toFix
Update all examples in
consts.tsto use the unifiedcommands: []format. Notypefield.Broader question
Should examples live in
consts.tsat all, or should they be inline with the schema definitions (.describe()/.meta())? Centralised consts can drift from the schema they describe. Inline examples are co-located with the schema they reference — harder to forget to update.🤖 Generated with Claude Code