You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
list-all-documentation builds each listing line from component.summary ?? description, truncating the description at 90 characters. Nothing populates component.summary: docgen extracts a component-level @summary JSDoc tag into reactDocgenTypescript.tags.summary, but no code path reads it from there. So the tag has no effect and every listing line is truncated description.
Related: #367. Same drop point (component-level JSDoc tags parsed but not carried into formatter output), different tag and tool.
Versions
storybook 10.3.6
@storybook/mcp 0.7.0; behavior unchanged on current main (packages/mcp/src/utils/manifest-formatter/markdown.ts)
/** * Segmented control for selecting exactly one value from a small set of mutually * exclusive options. Not for switching content panels; use Tabs for that. * * @summary selects one value from a set, as a form input (not for content switching; use Tabs) */exportconstSegmentedControl=/* ... */
Built components.json entry:
{
"jsDocTags": {},
"reactDocgenTypescript": {
"tags": { "summary": "selects one value from a set, as a form input (not for content switching; use Tabs)" }
}
// no top-level "summary" field
}
list-all-documentation output:
- SegmentedControl (example-segmentedcontrol): Segmented control for selecting exactly one value from a small set of mutually exclusive o...
Expected
The listing line uses the @summary text.
Actual
The listing line is the first 90 characters of the description. Checked across a ~60-component library: no component entry has a top-level summary, and every jsDocTags is {}.
Impact
Agents pick components from the listing. "Not for X, use Y" guidance (recommended by the Storybook AI best-practices docs) usually sits past the first 90 characters of a description, so truncation removes it from the selection surface. The only current workaround is rewriting descriptions so the first 90 characters stand alone.
Code pointers
packages/mcp/src/utils/manifest-formatter/markdown.ts: listing line is component.summary ?? description.slice(0, MAX_SUMMARY_LENGTH).
Storybook core manifest generation never writes the top-level summary field, though the schema types it as optional.
Summary
list-all-documentationbuilds each listing line fromcomponent.summary ?? description, truncating the description at 90 characters. Nothing populatescomponent.summary: docgen extracts a component-level@summaryJSDoc tag intoreactDocgenTypescript.tags.summary, but no code path reads it from there. So the tag has no effect and every listing line is truncated description.Related: #367. Same drop point (component-level JSDoc tags parsed but not carried into formatter output), different tag and tool.
Versions
storybook10.3.6@storybook/mcp0.7.0; behavior unchanged on currentmain(packages/mcp/src/utils/manifest-formatter/markdown.ts)react-vite,reactDocgen: 'react-docgen-typescript'Reproduction
Built
components.jsonentry:{ "jsDocTags": {}, "reactDocgenTypescript": { "tags": { "summary": "selects one value from a set, as a form input (not for content switching; use Tabs)" } } // no top-level "summary" field }list-all-documentationoutput:Expected
The listing line uses the
@summarytext.Actual
The listing line is the first 90 characters of the description. Checked across a ~60-component library: no component entry has a top-level
summary, and everyjsDocTagsis{}.Impact
Agents pick components from the listing. "Not for X, use Y" guidance (recommended by the Storybook AI best-practices docs) usually sits past the first 90 characters of a description, so truncation removes it from the selection surface. The only current workaround is rewriting descriptions so the first 90 characters stand alone.
Code pointers
packages/mcp/src/utils/manifest-formatter/markdown.ts: listing line iscomponent.summary ?? description.slice(0, MAX_SUMMARY_LENGTH).summaryfield, though the schema types it as optional.parseComponentDocLikereturns only{ props }, dropping component-leveltags(same as get-documentation omits component JSDoc tags (@deprecated) from its output #367).Possible fixes
reactDocgenTypescript.tags.summary(andjsDocTags.summaryfor the docgen-server path) before truncating the description.@summaryinto the manifest's top-levelsummaryfield at generation time, which fixes it for all manifest consumers.