diff --git a/packages/pen-mcp/src/__tests__/__snapshots__/d0-parity-spike.test.ts.snap b/packages/pen-mcp/src/__tests__/__snapshots__/d0-parity-spike.test.ts.snap index df31daf36..bfd2dfdf9 100644 --- a/packages/pen-mcp/src/__tests__/__snapshots__/d0-parity-spike.test.ts.snap +++ b/packages/pen-mcp/src/__tests__/__snapshots__/d0-parity-spike.test.ts.snap @@ -3,7 +3,7 @@ exports[`D0 parity spike — additive & gated tool registration > pre-D0 production design tool DEFINITIONS are unchanged (snapshot) > pre-d0-design-tool-definitions 1`] = ` [ { - "description": "Get design knowledge prompt. Use "section" to retrieve a focused subset instead of the full prompt. Sections: schema (PenNode types), layout (flexbox rules), roles (semantic roles), text (typography/CJK/copywriting), style (visual style policy — reads the active document's design.md when present), icons (icon names), examples (design examples), guidelines (design tips), planning (layered workflow guide), elements (N-tool element-tool family reference), design-md (raw style policy derived from the active document's design.md, or a "no design.md" notice). Omit section for the full prompt.", + "description": "Get design knowledge prompt. Pass \`section\` to retrieve a focused subset instead of the full prompt; the available section names are published in \`inputSchema.section.enum\` (derived at server-start from the implementation registry, so this description never drifts as sections are added). Omit \`section\` for the full prompt. The "style" and "design-md" sections are derived from the active document's design.md so the response never leaks another file's design system.", "inputSchema": { "properties": { "filePath": { diff --git a/packages/pen-mcp/src/routes/design-routes.ts b/packages/pen-mcp/src/routes/design-routes.ts index 885d3a69c..1124caee1 100644 --- a/packages/pen-mcp/src/routes/design-routes.ts +++ b/packages/pen-mcp/src/routes/design-routes.ts @@ -25,12 +25,12 @@ const CORE_DESIGN_TOOL_DEFINITIONS = [ { name: 'get_design_prompt', description: - 'Get design knowledge prompt. Use "section" to retrieve a focused subset instead of the full prompt. ' + - 'Sections: schema (PenNode types), layout (flexbox rules), roles (semantic roles), text (typography/CJK/copywriting), ' + - "style (visual style policy — reads the active document's design.md when present), icons (icon names), " + - 'examples (design examples), guidelines (design tips), planning (layered workflow guide), ' + - 'elements (N-tool element-tool family reference), design-md (raw style policy derived from the active ' + - 'document\'s design.md, or a "no design.md" notice). Omit section for the full prompt.', + 'Get design knowledge prompt. Pass `section` to retrieve a focused subset instead of the ' + + 'full prompt; the available section names are published in `inputSchema.section.enum` ' + + '(derived at server-start from the implementation registry, so this description never ' + + 'drifts as sections are added). Omit `section` for the full prompt. The "style" and ' + + '"design-md" sections are derived from the active document\'s design.md so the response ' + + "never leaks another file's design system.", inputSchema: { type: 'object' as const, properties: {