memi

v2.7.4
io.github.sarveshsea/memi Checked 2 days ago Published 4 months ago

Memi is the read-only design engineering audit and skill layer for coding agents.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

pull_design_system

Pull the full design system from Figma (tokens, components, styles) into the local registry. Prereq: Figma bridge running + plugin connected — verify with check_bridge_health; start via `memi connect`. Returns: { tokens, components, styles, lastSync }. Errors: isError "Figma not connected" if no plugin. Run at session start or after designer changes; inspect results with get_tokens.

pull_design_system_rest

Pull the design system from Figma via REST API — no plugin or bridge required. Prereq: FIGMA_TOKEN and FIGMA_FILE_KEY env vars. Returns: { tokens, components, styles, lastSync }. Errors: missing env vars, or Figma API errors (403 = bad token, 404 = bad file key). Use in CI/headless; equivalent to `memi pull --rest`.

get_specs

List all saved specs (cheap summary operation). Returns: [{ name, type: "component"|"page"|"dataviz"|"design"|"ia", purpose? }]; [] when none exist. Use before create_spec (overwrite check) or generate_code; fetch a full body with get_spec.

get_spec

Fetch the full body of one spec by name. Returns: full spec JSON — ComponentSpec: atomicLevel, props, variants, composesSpecs, codeConnect, WCAG fields; PageSpec: sections, meta; DataVizSpec: chartType, dataShape. Errors: isError if the name is not found (list names via get_specs).

ParameterTypeDescription
name *stringName of the spec to retrieve (case-sensitive, matches the spec's 'name' field, not the filename). Use get_specs first to list available names.

create_spec

Create or overwrite a spec in the registry (Zod-validated). Same-name specs are silently overwritten — check get_specs first. Returns: `Spec "<name>" saved (<type>)`. Errors: isError with Zod details on schema/JSON/type failures. Schemas — component: name, type, atomicLevel ("atom"|"molecule"|"organism"|"template"), purpose, props[], variants[], composesSpecs[] (atoms must be []), codeConnect{}; page: name, type, purpose, sections[]; dataviz: name, type, chartType, dataShape.

ParameterTypeDescription
spec *stringJSON string of the full spec object. Must include a 'type' field ('component', 'page', or 'dataviz') and all required fields for that spec type. Zod validation errors are returned as structured error…

generate_code

Generate shadcn/ui + Tailwind code from a saved spec and write files into atomic design folders (atoms → components/ui/, molecules/organisms/templates → components/<level>/). Returns: { entryFile, files[], generatedAt, findings[], critique? }. For page specs, critique is an AI layout score (0-100) + hierarchy/spacing/consistency notes when an AI provider is configured — informational only, never blocks. Errors: isError if specName is not found. isError with { blocked: true, findings } if a critical quality-gate finding (raw hex/color when tokens exist, a token-pair contrast failure, or…

ParameterTypeDescription
specName *stringName of the spec to generate code for (case-sensitive, must match a spec returned by get_specs).
forcebooleanSet true to write files despite critical quality-gate findings. Only pass this after reviewing the findings and intentionally deciding to override them.

get_tokens

Get design tokens from the local registry, optionally filtered. Prereq: none — local read; run pull_design_system if empty. Returns: [{ name, type: "color"|"spacing"|"typography"|"radius"|"shadow"|"other", values (keyed by mode), cssVariable? }]; [] when none. format "dtcg" returns the same tokens as a W3C Design Tokens (DTCG) document instead — nested groups, $type/$value, lossless via $extensions. Filter by type/name to keep payloads small on large token sets. For a Tailwind-ready mapping use sync_design_tokens.

ParameterTypeDescription
formatstringOutput format: "memi" = flat token array (default); "dtcg" = W3C Design Tokens document for interop with other DTCG tooling.
namestringCase-insensitive substring filter on token names (e.g. 'primary').
typestringOnly return tokens of this type.

get_shadcn_registry

Build a shadcn registry.json-compatible index from the workspace (component specs; tokens map to a registry:theme item when present). Returns: { $schema, name, homepage, items[] } with file targets, registryDependencies, cssVars. For a single item use get_registry_item.

ParameterTypeDescription
homepagestringPublic homepage used to generate /r/*.json and Open-in-v0 metadata.
namestringRegistry name to embed in the shadcn registry index.

get_registry_item

Return one shadcn registry-item.json-compatible item from the workspace. Returns: files, targets, dependencies, cssVars, and Atomic Design metadata. Errors: isError if the item is unknown (discover names via get_shadcn_registry).

ParameterTypeDescription
name *stringComponent spec name or shadcn item slug, e.g. Button or button.
homepagestringPublic homepage used to generate item URL and Open-in-v0 metadata.

diagnose_app_quality

Diagnose UI quality for an existing shadcn/Tailwind app from code or a public URL. Returns on success: App-quality diagnosis V2 with scores, issues, evidence locations, affected files, confidence, effort estimates, fix categories, and app graph summary. Use this tool: before planning UI fixes, exporting a registry, or giving an AI editor context on real app design debt.

ParameterTypeDescription
filesarrayPR scope: emit only issues touching these repo-relative files. Whole-tree stats/scores are still computed — this reduces noise, not runtime.
maxFilesintegerMaximum source files to scan.
targetstringLocal path or public URL to scan. Defaults to the current project root.

generate_health_report

Compose one self-contained design-health report (HTML + markdown) from all persisted .memoire audits — app quality, UX tenets/traps, interface craft, skill compliance, and the score trend, with provenance badges, the not-assessed legend, and the active policy hash. Prereq: run diagnose_app_quality (or the CLI audits) first so artifacts exist; missing sections are listed, never silently omitted. Returns: { html, markdown, score, sections[], missing[] }. Static content — write it wherever needed. redact=true strips evidence excerpts (paths stay) for NDA-safe sharing.

ParameterTypeDescription
redactbooleanStrip evidence excerpts — paths and counts only.

check_skill_compliance

Check real source files for the objectively-checkable rules in skills/ATOMIC_DESIGN.md (composition, state, data-fetching, naming) and skills/MOTION_VIDEO_DESIGN.md (motion tokens, reduced-motion, GPU-safe properties) — a post-hoc, deterministic verification pass, the same mechanism a linter uses to enforce a style guide. This does not read the skill docs at check time or make an agent obey markdown — the checkable rules are hand-extracted into regex/string checks. It closes the gap where nothing downstream ever notices whether an agent actually followed those docs. skills/DESIGN_SYSTEM_R…

ParameterTypeDescription
maxFilesintegerMaximum source files to scan.
targetstringLocal path to scan. Defaults to the current project root.

plan_ui_fixes

Build a dry-run UI fix plan from diagnosis evidence and app graph data. Returns on success: { patches[], summary, caveats[] } where every patch includes risk, confidence, affected files, operations, and writeSafe. This tool never modifies source files. Use this tool: to decide what a human or coding agent should patch before calling memi fix apply or making manual edits.

ParameterTypeDescription
maxFilesintegerMaximum source files to scan.
targetstringLocal path or public URL to scan. Defaults to the current project root.

audit_ux_tenets_traps

Audit UX tenets and traps from app-quality evidence or a screenshot artifact. Returns on success: UX audit JSON with score, tenetCoverage, trapRisks, findings, and recommendedTweaks. This tool does not modify source files. Use this tool: when an agent needs a focused design critique packet for clarity, feedback, control, consistency, accessibility, error recovery, progressive disclosure, workflow fit, trust, and state continuity.

ParameterTypeDescription
maxFilesintegerMaximum source files to scan when target evidence is used.
screenshotPathstringOptional screenshot artifact path to attach to the UX audit.
targetstringLocal path or public URL to scan. Defaults to the current project root.

audit_interface_craft

Audit interface design craft from local app-quality evidence or a screenshot artifact. Returns: InterfaceCraftReport JSON — score, critique, dimensions, findings, topOpportunities (lenses: visual design, interface design, conventions, user context). Use before UI edits or after a redesign; pairs with diagnose_app_quality and audit_ux_tenets_traps.

ParameterTypeDescription
maxFilesintegerMaximum source files to scan when target evidence is used.
screenshotPathstringOptional screenshot artifact path to attach to the craft audit.
targetstringLocal path or public URL to scan. Defaults to the current project root.

prepare_design_agent_brief

Prepare a cost-aware design-agent brief before editing UI. Returns on success: JSON with mission, evidenceCommands, designRules, costControls, compatibility installs, MCP command, Agent Skills command, and handoffChecklist. Use this tool: as the first MCP call when a coding agent is asked to design, polish, audit, refactor, or generate interface code. It is local-first and does not call Figma, browsers, or models.

ParameterTypeDescription
agentstringAgent stack to prioritize in compatibility guidance, such as codex, hermes, openclaw, cursor, or claude-code.
detailstringPayload detail: compact for token-sensitive first turns, standard for runnable guidance, full for complete context.
intentstringNatural language product/design task to optimize the brief around.
modestringEvidence mode: local, figma, research, or full.
targetstringLocal path or URL the agent should inspect. Defaults to '.'.

prepare_apple_design_brief

Prepare a compact, local-first Apple-platform design and verification brief. Returns: mission, skill triggers, availability policy, Xcode preflight, design checks, build/test commands, and handoff requirements. Use before creating or changing SwiftUI, SwiftData, App Intents, Liquid Glass, or concurrency-sensitive UI. This tool does not run Xcode or mutate files.

ParameterTypeDescription
detailstringResponse size: compact, standard, or full.
intentstringProduct, interaction, or implementation intent used to select focused skills.
platformstringApple platform to target: ios or macos.

scaffold_swiftui_files

Preview or write a deterministic SwiftUI feature scaffold. Default approved=false is non-mutating and returns every planned path and file body: Memi iOS spec, SwiftUI view, optional screen model, preview, and Swift Testing file. Set approved=true only after reviewing the plan. Writes never alter Xcode project files and refuse to overwrite existing files.

ParameterTypeDescription
moduleName *stringSwift module imported by the generated @testable test target.
name *stringPascalCase feature or component type name, such as Settings or CommandBar.
approvedbooleanMust be true to write. false returns a complete dry-run plan.
atomicLevelstringAtomic Design level for component scaffolds; screens are always page.
deploymentTargetstringMinimum iOS deployment target in major.minor form.
intentstringProduct and design intent recorded in the generated spec.
kindstringscreen creates model + view + test; component creates view + test.
liquidGlassbooleanAdd an iOS 26+ glassEffect branch with a native material fallback.
outputRootstringWorkspace-relative Swift source root.
testsRootstringWorkspace-relative Swift test root.

scaffold_agent_design_files

Preview or write a spec-first Atomic Design scaffold for agent-created files. Default is non-mutating: approved=false returns a dry-run JSON plan with the exact spec path, guardrails, and next generation commands. To write the spec, pass approved=true. This writes only the registry spec; generated code still requires generate_code or memi generate, so quality gates stay intact.

ParameterTypeDescription
kind *stringScaffold kind. component writes specs/components/<Name>.json; page writes specs/pages/<Name>.json.
name *stringSpec name. Must start with a letter and contain only letters, numbers, hyphens, or underscores.
approvedbooleanMust be true to write the spec. false returns a dry-run plan.
composesSpecsarrayExisting component specs this component composes. Invalid for atom scaffolds.
intentstringAgent task or product intent behind the scaffold.
layoutstringPage layout for page scaffolds.
levelstringAtomic Design level for component scaffolds. Inferred when omitted.
purposestringPurpose copied into the generated spec.
sectionsarrayPage sections for page scaffolds.
shadcnBasearrayshadcn/ui base components for component scaffolds.

update_token

Update a design token value in the local registry, optionally pushing to Figma. Prereq: token must exist (names via get_tokens); Figma connection only for pushToFigma. Returns: { updated: true, name, pushedToFigma, reason? } — a requested-but-skipped or failed push is reported in reason, never silently dropped. Errors: isError if the token name is not found. For bulk Tailwind mapping use sync_design_tokens.

ParameterTypeDescription
name *stringToken name as it appears in get_tokens output (e.g. "Colors/Primary") or as a DTCG dot-path (e.g. "colors.primary") — exact match tried first, then case-insensitive path match.
values *objectMode-to-value map to merge into existing values (e.g. { "Light": "#FF0000", "Dark": "#FF6666" }). Only the modes you provide are updated — other modes are preserved.
pushToFigmabooleanIf true and Figma is connected, push this token change to the Figma file immediately. Defaults to false (local registry only).

capture_screenshot

Capture a screenshot of a Figma node (or the current page) as image data. Prereq: bridge + plugin connected (check_bridge_health); node IDs from get_selection or get_page_tree. Returns: { type: "image", data: base64, mimeType }. Feed into analyze_design; first step of the self-heal loop (CREATE → SCREENSHOT → ANALYZE → FIX). Prefer SVG for vector components, PNG for complex frames. Errors: isError if not connected or the node is invalid.

ParameterTypeDescription
formatstringExport format. PNG for raster output (default, works for all node types). SVG for vector output (best for icons and simple components).
nodeIdstringFigma node ID to capture (e.g. '123:456'). Omit to capture the entire current page. Obtain IDs from get_selection or get_page_tree.
scalenumberExport scale multiplier (default 2 = @2x, max 4). Use 1 for quick inspection, 2–3 for high-quality analysis.

get_selection

Get the nodes currently selected in Figma with layout/style details. Prereq: bridge + plugin connected; returns [] if nothing is selected. Returns: [{ id, name, type, width, height, x, y, layoutMode?, padding/sizing/itemSpacing?, fills?, strokes?, effects?, styles?, variantProperties? }]. Use for node IDs (capture_screenshot, analyze_design) or reading layout/variants before writing a spec. Errors: isError if not connected.

compose

Run the agent orchestrator on a natural-language design intent — classifies, builds a multi-step plan, executes it. Prereq: Figma bridge only for Figma-touching intents. Returns: { success, plan: { steps[] }, results[], summary, errors? }; success=false with errors on failure (per-step failures do not abort the plan). Examples: "create a dashboard page with KPI cards, a chart, and a data table"; "audit button variants for WCAG contrast"; "pull design system, then generate all missing component specs". Be specific — name components, atomic levels, and target output.

ParameterTypeDescription
intent *stringNatural language design task. Be specific about what to create, modify, or check. Include atomic level if relevant (atom/molecule/organism/template/page), component names, and target output (spec, cod…
dryRunbooleanIf true, returns the execution plan without running any steps. Use to inspect what the orchestrator intends to do before committing. Defaults to false.

run_audit

Run a deterministic design-system audit (WCAG contrast, token completeness, spec accessibility) and return structured findings. Prereq: none — token/spec level, no Figma, no AI. Returns: { success, results: issues[], score, level, summary }. focus="contrast" narrows to token contrast pairs; focus="skill-compliance" checks real source files against ATOMIC_DESIGN.md/MOTION_VIDEO_DESIGN.md's checkable rules. vs analyze_design: run_audit = systematic spec/token compliance; analyze_design = AI vision review of a live Figma frame.

ParameterTypeDescription
focusstringOptional focus area to narrow the audit scope. Examples: 'accessibility' (runs all 5 WCAG checks), 'token coverage' (checks which components use design tokens vs hardcoded values), 'naming' (validates…
maxFilesintegerMaximum source files to scan when focus='skill-compliance'.
targetstringLocal path to scan when focus='skill-compliance'. Defaults to the current project root.

design_systems_context

Normalize design-systems-mcp corpus data into compact, deterministic agent context. This read-only tool validates caller-supplied JSON and never fetches URLs, reads files, writes files, or executes corpus content. Use mode=corpus with a native manifest plus filename-keyed entries, or mode=category with the proposed category-manifest/v1 envelope. Returns byte-capped context plus inclusion counts.

ParameterTypeDescription
manifest *stringManifest JSON string.
mode *stringNative corpus manifest plus entries, or category-manifest/v1.
categorystringOptional category filter for mode=corpus.
entriesstringFilename-keyed entry JSON object. Required only for mode=corpus.
maxBytesinteger
maxEntriesinteger
summaryCharactersinteger

get_research

Load and return the project's user research V2 store — observations, findings, personas, themes, quantitative metrics, and quality metadata. Prerequisites: None — reads from the local .memoire/research/ directory. Research data is populated by running `memi research from-file`, `memi research from-stickies`, `memi research from-transcript`, `memi research web`, or `memi research synthesize`. Returns an empty V2 store if no research has been imported yet. Returns on success: Research store object with shape { version, sources, observations, findings, themes, personas, quantitativeMetrics,…

ParameterTypeDescription
sectionsarraySections to include in full. Omit for a lightweight overview: summary + per-section counts. Pass the sections you actually need to keep the payload small.

research_design_package

Preview a research-backed vibe design package from ResearchStore V2 plus an optional simulation run. Returns on success: { package } with brief, Atomic Design specs, evidence ids, Mermaid Jam-ready source artifacts, and warnings. This tool is non-mutating; call research_generate_specs to write specs or mermaid_jam_export to write FigJam source files.

ParameterTypeDescription
hypothesisstringProduct/design hypothesis to ground generated specs.
intentstringDesign intent for the package.
researchstringOptional ResearchStore JSON string. Omit to load workspace research.
runIdstringOptional simulation run id to fold report recommendations and timeline into the package.

research_generate_specs

Write research-backed Atomic Design specs generated from ResearchStore V2. Prerequisites: Call research_design_package first to preview. This tool requires approved=true to make the write explicit. Writes DesignSpec, IASpec, PageSpec, ComponentSpec, and DataVizSpec objects through the Memoire registry.

ParameterTypeDescription
approvedbooleanMust be true to write generated specs.
hypothesisstring
intentstring
researchstringOptional ResearchStore JSON string. Omit to load workspace research.
runIdstring

mermaid_jam_export

Write Mermaid Jam-ready FigJam source artifacts from research or a simulation run. This is source + open friendly: it writes .mmd/.md files under .memoire/mermaid-jam and returns next steps. It does not attempt clipboard or direct paste automation.

ParameterTypeDescription
hypothesisstring
intentstring
researchstringOptional ResearchStore JSON string. Omit to load workspace research.
sourcestringUse 'research' or a simulation run id.

simulation_models

List Codex-first model profiles available to Memoire model-swarm simulations. Live model execution is opt-in; unavailable providers automatically fall back to deterministic clean-room simulation.

simulation_list_runs

List persisted simulation runs with lightweight summaries. Use this to discover runIds for simulation_status, simulation_stream, simulation_transcript, simulation_costs, simulation_report, and simulation_compare.

simulation_generate_agents

Generate a 20-60 agent model-swarm cohort from Memoire research evidence without starting a run.

ParameterTypeDescription
adapterstringAdapter mode. Defaults to model-swarm.
countintegerTarget agent count. Model-swarm defaults to 24.
researchstringOptional ResearchStore JSON string. Omit to load workspace research.

simulation_plan

Create a clean-room product simulation scenario from Memoire research evidence. Prereq: research/store.v2.json or a ResearchStore JSON string. Local TypeScript simulation core only; adapter=model-swarm plans Codex-first profiles with deterministic fallback. Returns: { scenario (agents, variables, graph, evidenceFindingIds), warnings }.

ParameterTypeDescription
adapterstringAdapter mode. Defaults to local.
agentCountintegerTarget model-swarm agent count.
hypothesisstringProduct hypothesis to pressure-test.
maxAgentsintegerRun budget max agents.
namestringScenario name. Defaults to the top research theme.
researchstringOptional ResearchStore JSON string. Omit to load the current workspace research store.
roundsintegerRun budget max rounds.

simulation_run

Run a prepared local or model-swarm product simulation scenario. Prerequisites: Call simulation_plan first and pass the returned scenario.id. Returns on success: SimulationRun with status, events, eventCount, and persisted run id.

ParameterTypeDescription
scenarioId *stringScenario id returned by simulation_plan.
adapterstringAdapter mode. Defaults to the scenario adapter.
allowLiveModelsbooleanOpt into live provider calls. Defaults to false.
maxAgentsinteger
roundsinteger

simulation_run_matrix

Plan and run multiple model-swarm hypotheses, then compare outcomes for product-spec decision work.

ParameterTypeDescription
hypotheses *arrayHypotheses to run.
maxAgentsinteger
researchstringOptional ResearchStore JSON string.
roundsinteger

simulation_stream

Read persisted simulation events in stream order. Paginated — use offset/limit to page through long runs instead of materializing the full event log.

ParameterTypeDescription
runId *stringSimulation run id.
limitintegerMaximum events to return (default 200).
offsetintegerSkip this many events from the start.

simulation_status

Read a local simulation run status from .memoire/simulations/runs.

ParameterTypeDescription
runId *stringSimulation run id.

simulation_interview

Interview a simulated product stakeholder from a completed local or model-swarm run.

ParameterTypeDescription
agentId *stringAgent id from the scenario.
prompt *stringQuestion to ask the simulated agent.
runId *stringSimulation run id.

simulation_transcript

Read model-swarm transcript memory for a run.

ParameterTypeDescription
runId *stringSimulation run id.

simulation_compare

Compare completed simulation runs by adoption, confidence, evidence coverage, risk, and cost.

ParameterTypeDescription
runIds *arraySimulation run ids.

simulation_costs

Summarize token and cost usage for a simulation run.

ParameterTypeDescription
runId *stringSimulation run id.

simulation_report

Export a simulation report with recommendations, risks, assumptions, events, interviews, and evidenceFindingIds.

ParameterTypeDescription
runId *stringSimulation run id.

simulation_export_spec

Convert a simulation report into a product-spec impact artifact that agents can paste into specs or handoff docs.

ParameterTypeDescription
runId *stringSimulation run id.

analyze_design

Capture a Figma node and analyze it with configured AI vision. Prereq: bridge + plugin connected; a vision-capable AI provider configured; spec-compliance mode needs the spec in the registry. Returns by mode — general: { summary, issues[], suggestions[], qualityScore }; accessibility: { summary, contrastIssues[], touchTargetIssues[], focusIssues[], wcagLevel }; spec-compliance: { summary, compliant, mismatches[], missingProps[], extraElements[] }. Errors: isError on missing key, no connection, bad node, or missing spec. Modes: general = visual polish; accessibility = WCAG checks of a frame;…

ParameterTypeDescription
modestringAnalysis mode: 'general' for visual quality and polish, 'accessibility' for WCAG contrast/touch/focus checks, 'spec-compliance' to verify the design matches a saved spec (requires specName).
nodeIdstringFigma node ID to capture and analyze (e.g. '123:456'). Omit to capture the entire current page. Obtain IDs from get_selection or get_page_tree.
specNamestringName of the spec to compare against (required when mode='spec-compliance'). Use get_specs to list available spec names.

get_page_tree

Get the hierarchical node tree of the current Figma file. Prereq: bridge + plugin connected. Returns: array of pages { id, name, type: "PAGE", children[] }; child nodes { id, name, type, children? }. IDs feed capture_screenshot and analyze_design. depth=1 pages only, 2 (default) top-level frames, 3+ component internals — high depths may be slow on large files.

ParameterTypeDescription
depthintegerMaximum tree depth to traverse (default 2, max 8). Depth 1 = pages only, depth 2 = pages + top-level frames, depth 3+ = deeper into component trees. Large files at depth 4+ may be slow.

measure_text

Predict text layout — height, line count, overflow, breakpoint behavior — via Node canvas. No browser, Figma, or AI needed. Returns: { height, lineCount, lines[] }; plus { overflow } when containerHeight is given; plus { breakpoints: { mobile, tablet, desktop } } when checkBreakpoints=true. Never throws (0 height / 1 line for unparseable fonts). Use to verify labels or body copy fit fixed containers or maxLines constraints before generating designs or code.

ParameterTypeDescription
maxWidth *numberMaximum container width in pixels for line wrapping calculations.
text *stringThe text content to measure. Include all characters including newlines if the source content has them.
checkBreakpointsbooleanIf true, also measures text at mobile (375px), tablet (768px), and desktop (1280px) widths in addition to maxWidth. Useful for responsive overflow detection.
containerHeightnumberIf provided, checks whether the measured text fits within this height (in pixels) and reports overflow. Omit if you only need dimensions.
fontstringCSS font shorthand string used for measurement (e.g. '16px Inter', 'bold 14px sans-serif', '500 13px/1.4 system-ui'). Use the same font as your target UI for accurate results.
lineHeightnumberLine height in pixels. Defaults to fontSize × 1.5 if omitted. Provide this to match your Tailwind leading-* or Figma line height setting.

sync_design_tokens

Map registry tokens to a Tailwind theme.extend object; optionally import a W3C DTCG token file first. Prereq: tokens in the registry (pull_design_system first) — or pass dtcgFile to import them here. Never throws — returns {} when empty. Returns: partial theme (colors, spacing, fontSize, borderRadius, boxShadow) using var(--token) references; keys from the last token-name segment; "other" tokens skipped. With dtcgFile also { imported, warnings }. vs get_tokens: get_tokens = raw data for inspection (format "dtcg" exports the DTCG document); this = paste-ready Tailwind patch.

ParameterTypeDescription
dtcgFilestringPath to a W3C Design Tokens (.tokens.json / DTCG) file to import into the registry before mapping. Upserts by token name; parse warnings are returned, never silently dropped.

check_bridge_health

Check health of the Figma WebSocket bridge. Works with no plugin connected; never throws. Returns: { status: "healthy"|"degraded"|"down", connected, clientCount, latencyMs, uptimeSeconds, port, error? } — clientCount 0 means no plugin open in Figma. Call this first before any Figma-dependent tool.

design_doc

Scrape a public URL and extract its design system — parses CSS custom properties, colors, fonts, spacing, radii, shadows; the configured AI provider synthesizes a DESIGN.md. Prereq: publicly accessible URL; configured AI provider for synthesis (pass raw=true without it). Returns (raw=false): DESIGN.md with Color System, Typography, Spacing, Borders & Surfaces, Component Patterns, Voice & Tone, Do/Don't, Tailwind Config Sketch. Returns (raw=true): { url, title, tokens: { cssVars, colors, fonts, fontSizes, spacing, radii, shadows, counts } }. Errors: isError if the URL is unreachable/has no u…

ParameterTypeDescription
url *stringFully-qualified public URL to extract design tokens from (e.g. 'https://stripe.com', 'https://linear.app'). Must be accessible without authentication.
rawbooleanIf false (default), returns an AI-synthesized DESIGN.md document (requires a configured AI provider). If true, returns raw parsed token data without calling AI.

get_ai_usage

AI token usage and estimated cost for this MCP session (in-memory tracker; never throws; unknown when provider pricing is not configured). Returns: { calls, inputTokens, outputTokens, estimatedCost, knownEstimatedCost, costComplete, unpricedCalls, summary }. Use to monitor spend from analyze_design, design_doc, or compose.