Skip to main content
Glama
stevebrownlee

storybook-mcp

storybook_compose_view

Compose existing Storybook components into a new page or view by specifying layout, props, and state. Optionally generates a Storybook story for the composed view.

Instructions

Compose existing Storybook components into a higher-order page or view.

Fetches the Storybook component catalog, resolves the requested (or auto-discovered) child components, then scaffolds a new page/view file that imports and wires them together with layout, props, local state, and event handlers. Optionally generates a Storybook story for the view.

Use storybook_list_components first to see what's available, then storybook_get_component to inspect props/args before composing.

Args: params (ComposeViewInput): Validated input containing: - name (str): PascalCase page/view name, e.g. 'DashboardPage' - description (str): Natural-language description of the page - components (Optional[List[ComponentPlacement]]): Explicit component list - layout (Optional[str]): Layout strategy hint - include_state (bool): Generate useState/handlers (default True) - include_story (bool): Generate a story file (default True) - category (Optional[str]): Storybook category (default 'Pages')

Returns: str: Markdown summary with all generated file contents.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description explains that the tool creates new files (scaffolding a page/view and optionally a story), which is a side effect beyond the read-only annotations. It also mentions fetching the catalog (read) and resolving components. The destructive hint is false, which aligns with file creation (reversible). No contradictions and adds context beyond annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is structured with a clear separation of purpose, process, guidance, args, and returns. It is relatively long but justified by the tool's complexity (nested input, multiple options). Every sentence serves a purpose, and the key info is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (nested ComposeViewInput object, auto-discovery, multiple generation options), the description covers all necessary aspects: what it does, prerequisites (use list/get tools), input parameters with their roles, and output format (Markdown summary). It is fully adequate for an agent to use correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although the schema already describes parameters well, the tool description's 'Args' section adds value by summarizing each parameter's role in the composition process (e.g., auto-discovery when components are omitted). This helps the agent understand how parameters interact beyond the schema definitions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it composes existing Storybook components into a higher-order page or view, detailing the process (fetches catalog, resolves components, scaffolds file). It distinguishes from siblings like storybook_create_component (creates new components) and storybook_list_components (lists components), ensuring no ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit guidance is provided: 'Use storybook_list_components first to see what's available, then storybook_get_component to inspect props/args before composing.' This tells the agent exactly how to prepare and when to use this tool relative to siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/stevebrownlee/storybook-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server