Skip to main content
Glama
southleft

figma-console-mcp

by southleft

figma_ds_setup_storybook

Connects a freshly initialized Storybook to an extracted design system by generating preview CSS, copying fonts, and patching config for Tailwind, JSX, and theme switching so stories render correctly.

Instructions

Wire a freshly-initialized Storybook workshop to the extracted design system — run AFTER npm create storybook@latest inside outDir. Generates .storybook/preview.css (Tailwind entry importing the extracted tokens plus the SOURCE app's @theme utility mapping, custom @utility definitions, @layer base, and @font-face rules mined from its stylesheets, with a dark variant covering both .dark and [data-theme] conventions), copies self-hosted font files into staticDirs, and patches main.js (tailwind vite plugin + automatic JSX runtime — without it stories throw 'React is not defined') and preview.jsx (preview.css import + a theme toolbar/decorator using the extracted mode names). Idempotent; anything it can't patch safely is returned as a manual step. Local Mode only.

Input Schema

NameRequiredDescriptionDefault
outDirYesThe design-system package dir (same outDir as figma_ds_analyze) containing the freshly-initialized .storybook/.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.46.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description fully carries the burden: it discloses idempotency, that unsafe patches are returned as manual steps, why the JSX runtime is patched ('without it stories throw React is not defined'), dark-variant conventions handled, and Local Mode restriction. That is unusually rich behavioral context.

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?

Front-loaded with the action and the ordering precondition, then details. It is dense with nested parentheticals that make it long, but every clause conveys distinct behavioral information rather than filler.

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?

For a 1-param, no-output-schema tool, the description covers what it does, when it applies, what it modifies, and how it handles failures (manual steps). Nothing an agent needs in order to invoke it correctly is missing.

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?

Schema coverage is 100% so the single param is already documented, but the description adds value by tying outDir to figma_ds_analyze's outDir and requiring the presence of a freshly-initialized .storybook/ directory, clarifying the expected state.

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?

States a specific verb+resource ('Wire a freshly-initialized Storybook workshop to the extracted design system') and enumerates the concrete artifacts it produces (preview.css, font files, main.js/preview.jsx patches). This is clearly distinct from sibling ds_ tools like figma_ds_scaffold or figma_ds_analyze.

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

Usage Guidelines4/5

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

Explicitly states the precondition ('run AFTER `npm create storybook@latest` inside outDir') and scope ('Local Mode only'), which pins down when it applies. It doesn't name the neighboring ds_ tools as alternatives or give exclusion conditions, so a 4 rather than a 5.

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

Deploy Server

Other Tools