@ufira/vibma 0.3.2 → 1.0.0-rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/mcp.cjs +2455 -1159
- package/dist/mcp.cjs.map +1 -1
- package/dist/mcp.js +2457 -1161
- package/dist/mcp.js.map +1 -1
- package/dist/tools/endpoint.cjs +10 -1
- package/dist/tools/endpoint.cjs.map +1 -1
- package/dist/tools/endpoint.js +10 -1
- package/dist/tools/endpoint.js.map +1 -1
- package/dist/tools/generated/guards.cjs +786 -0
- package/dist/tools/generated/guards.cjs.map +1 -0
- package/dist/tools/generated/guards.d.cts +92 -0
- package/dist/tools/generated/guards.d.ts +92 -0
- package/dist/tools/generated/guards.js +718 -0
- package/dist/tools/generated/guards.js.map +1 -0
- package/dist/tools/registry.cjs +946 -2
- package/dist/tools/registry.cjs.map +1 -1
- package/dist/tools/registry.js +948 -2
- package/dist/tools/registry.js.map +1 -1
- package/dist/tools/schemas.cjs +43 -6
- package/dist/tools/schemas.cjs.map +1 -1
- package/dist/tools/schemas.d.cts +38 -6
- package/dist/tools/schemas.d.ts +38 -6
- package/dist/tools/schemas.js +38 -6
- package/dist/tools/schemas.js.map +1 -1
- package/dist/tools/types.cjs.map +1 -1
- package/dist/tools/types.d.cts +5 -1
- package/dist/tools/types.d.ts +5 -1
- package/dist/tools/types.js.map +1 -1
- package/package.json +6 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/tools/registry.ts","../../src/tools/types.ts"],"sourcesContent":["import type { McpServer, SendCommandFn, Capabilities, ToolDef } from \"./types\";\nimport { mcpJson, mcpError } from \"./types\";\n\n/**\n * Batch-register declarative ToolDefs on the MCP server.\n *\n * 1. Filters by tier: read → always, create → caps.create, edit → caps.edit\n * 2. Resolves dynamic schemas (endpoint tools pass caps-dependent functions)\n * 3. Generates a uniform handler: validate? → sendCommand → formatResponse ?? mcpJson\n */\nexport function registerTools(\n server: McpServer,\n sendCommand: SendCommandFn,\n caps: Capabilities,\n tools: ToolDef[],\n): void {\n for (const tool of tools) {\n // Tier gate\n if (tool.tier === \"create\" && !caps.create) continue;\n if (tool.tier === \"edit\" && !caps.edit) continue;\n\n const schema = typeof tool.schema === \"function\" ? tool.schema(caps) : tool.schema;\n const command = tool.command ?? tool.name;\n const timeout = tool.timeout;\n const format = tool.formatResponse ?? mcpJson;\n\n server.registerTool(tool.name, { description: tool.description, inputSchema: schema }, async (params: any) => {\n try {\n if (tool.validate) tool.validate(params);\n const result = await sendCommand(command, params, timeout);\n return format(result);\n } catch (e) {\n return mcpError(`${tool.name} error`, e);\n }\n });\n }\n}\n","import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport type { z } from \"zod\";\n\n/** Function signature for sending commands to Figma via WebSocket */\nexport type SendCommandFn = (command: string, params?: unknown, timeoutMs?: number) => Promise<unknown>;\n\n/** Re-export McpServer type for tool files */\nexport type { McpServer };\n\n// ─── Tool Registry Types ────────────────────────────────────────\n\n/** Access tier for a tool */\nexport type ToolTier = \"read\" | \"create\" | \"edit\";\n\n/** Which tiers are enabled for this MCP session */\nexport interface Capabilities { create: boolean; edit: boolean }\n\n/** Declarative tool definition — replaces imperative registerMcpTools() */\nexport interface ToolDef {\n name: string;\n description: string;\n schema: Record<string, z.ZodTypeAny>\n | ((caps: Capabilities) => Record<string, z.ZodTypeAny>);\n tier: ToolTier;\n /** Figma command name. Defaults to name. */\n command?: string;\n /** sendCommand timeout in ms (default: 30 000) */\n timeout?: number;\n /** Pre-send validation (e.g. per-method item parsing for endpoints) */\n validate?: (params: any) => void;\n /** Custom response formatter. Default: mcpJson */\n formatResponse?: (result: unknown) => any;\n}\n\n/** Standard batch result from Figma handlers */\nexport interface BatchResult<T = unknown> {\n results: Array<T | \"ok\" | { error: string }>;\n warnings?: string[];\n /** Set when some items were deferred (e.g. font loading cap exceeded) */\n deferred?: string;\n}\n\n/** Max response size in characters (~12K tokens). Prevents LLM client-side truncation that corrupts JSON. */\nconst MAX_RESPONSE_CHARS = 50_000;\n\n/** Format a successful MCP response (JSON). Returns a clean error if response exceeds safe size. */\nexport function mcpJson(data: unknown) {\n const text = JSON.stringify(data);\n if (text.length <= MAX_RESPONSE_CHARS) {\n return { content: [{ type: \"text\" as const, text }] };\n }\n return {\n content: [{\n type: \"text\" as const,\n text: JSON.stringify({\n _error: \"response_too_large\",\n _sizeKB: Math.round(text.length / 1024),\n warning: \"Response exceeds safe size. Use 'depth', 'fields', 'limit', or 'summaryOnly' parameters to reduce response size.\",\n }),\n }],\n };\n}\n\n/** Format an error MCP response */\nexport function mcpError(prefix: string, error: unknown) {\n const msg = error instanceof Error ? error.message : String(error);\n return { content: [{ type: \"text\" as const, text: `${prefix}: ${msg}` }] };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC2CA,IAAM,qBAAqB;AAGpB,SAAS,QAAQ,MAAe;AACrC,QAAM,OAAO,KAAK,UAAU,IAAI;AAChC,MAAI,KAAK,UAAU,oBAAoB;AACrC,WAAO,EAAE,SAAS,CAAC,EAAE,MAAM,QAAiB,KAAK,CAAC,EAAE;AAAA,EACtD;AACA,SAAO;AAAA,IACL,SAAS,CAAC;AAAA,MACR,MAAM;AAAA,MACN,MAAM,KAAK,UAAU;AAAA,QACnB,QAAQ;AAAA,QACR,SAAS,KAAK,MAAM,KAAK,SAAS,IAAI;AAAA,QACtC,SAAS;AAAA,MACX,CAAC;AAAA,IACH,CAAC;AAAA,EACH;AACF;AAGO,SAAS,SAAS,QAAgB,OAAgB;AACvD,QAAM,MAAM,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AACjE,SAAO,EAAE,SAAS,CAAC,EAAE,MAAM,QAAiB,MAAM,GAAG,MAAM,KAAK,GAAG,GAAG,CAAC,EAAE;AAC3E;;;ADzDO,SAAS,cACd,QACA,aACA,MACA,OACM;AACN,aAAW,QAAQ,OAAO;AAExB,QAAI,KAAK,SAAS,YAAY,CAAC,KAAK,OAAQ;AAC5C,QAAI,KAAK,SAAS,UAAU,CAAC,KAAK,KAAM;AAExC,UAAM,SAAS,OAAO,KAAK,WAAW,aAAa,KAAK,OAAO,IAAI,IAAI,KAAK;AAC5E,UAAM,UAAU,KAAK,WAAW,KAAK;AACrC,UAAM,UAAU,KAAK;AACrB,UAAM,SAAS,KAAK,kBAAkB;AAEtC,WAAO,aAAa,KAAK,MAAM,EAAE,aAAa,KAAK,aAAa,aAAa,OAAO,GAAG,OAAO,WAAgB;AAC5G,UAAI;AACF,YAAI,KAAK,SAAU,MAAK,SAAS,MAAM;AACvC,cAAM,SAAS,MAAM,YAAY,SAAS,QAAQ,OAAO;AACzD,eAAO,OAAO,MAAM;AAAA,MACtB,SAAS,GAAG;AACV,eAAO,SAAS,GAAG,KAAK,IAAI,UAAU,CAAC;AAAA,MACzC;AAAA,IACF,CAAC;AAAA,EACH;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/tools/registry.ts","../../src/tools/types.ts","../../src/tools/generated/help.ts"],"sourcesContent":["import { ZodError } from \"zod\";\nimport type { McpServer, SendCommandFn, Capabilities, ToolDef } from \"./types\";\nimport { mcpJson, mcpError } from \"./types\";\nimport { resolveHelp, resolveEndpointHelp } from \"./generated/help\";\n\n/**\n * Resolve the Figma command name for a tool call.\n *\n * - If tool has a commandMap, uses params.method to look up the command.\n * Convention: command = \"{toolName}.{method}\"\n * - Otherwise falls back to tool.command or tool.name (legacy standalone tools).\n */\nfunction resolveCommand(tool: ToolDef, params: any): string {\n if (tool.commandMap && params.method) {\n const cmd = tool.commandMap[params.method];\n if (cmd) return cmd;\n }\n return tool.command ?? tool.name;\n}\n\n/**\n * Batch-register declarative ToolDefs on the MCP server.\n *\n * 1. Filters by tier: read → always, create → caps.create, edit → caps.edit\n * 2. Resolves dynamic schemas (endpoint tools pass caps-dependent functions)\n * 3. Generates a uniform handler: validate? → sendCommand → formatResponse ?? mcpJson\n */\nexport function registerTools(\n server: McpServer,\n sendCommand: SendCommandFn,\n caps: Capabilities,\n tools: ToolDef[],\n): void {\n for (const tool of tools) {\n // Tier gate\n if (tool.tier === \"create\" && !caps.create) continue;\n if (tool.tier === \"edit\" && !caps.edit) continue;\n\n const schema = typeof tool.schema === \"function\" ? tool.schema(caps) : tool.schema;\n const timeout = tool.timeout;\n const defaultFormat = tool.formatResponse ?? mcpJson;\n\n server.registerTool(tool.name, { description: tool.description, inputSchema: schema }, async (params: any) => {\n try {\n // Help method — handled inline, not sent to Figma\n if (params.method === \"help\") {\n const text = resolveEndpointHelp(tool.name, params.topic) ?? resolveHelp(tool.name);\n return { content: [{ type: \"text\" as const, text }] };\n }\n\n if (tool.validate) tool.validate(params);\n const command = resolveCommand(tool, params);\n const result = await sendCommand(command, params, timeout);\n const format = (tool.methodFormatters?.[params.method]) ?? defaultFormat;\n return format(result);\n } catch (e) {\n if (e instanceof ZodError) {\n const hints = e.issues.map(i => {\n const path = i.path.join(\".\");\n return `[${path}] ${i.message}`;\n });\n return mcpError(`${tool.name} validation error`, hints.join(\"; \"));\n }\n return mcpError(`${tool.name} error`, e);\n }\n });\n }\n}\n","import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport type { z } from \"zod\";\n\n/** Function signature for sending commands to Figma via WebSocket */\nexport type SendCommandFn = (command: string, params?: unknown, timeoutMs?: number) => Promise<unknown>;\n\n/** Re-export McpServer type for tool files */\nexport type { McpServer };\n\n// ─── Tool Registry Types ────────────────────────────────────────\n\n/** Access tier for a tool */\nexport type ToolTier = \"read\" | \"create\" | \"edit\";\n\n/** Which tiers are enabled for this MCP session */\nexport interface Capabilities { create: boolean; edit: boolean }\n\n/** Declarative tool definition — replaces imperative registerMcpTools() */\nexport interface ToolDef {\n name: string;\n description: string;\n schema: Record<string, z.ZodTypeAny>\n | ((caps: Capabilities) => Record<string, z.ZodTypeAny>);\n tier: ToolTier;\n /** Figma command name. Defaults to name. For legacy standalone tools. */\n command?: string;\n /** Method → Figma command dispatch map. For endpoint tools (generated by schema compiler). */\n commandMap?: Record<string, string>;\n /** sendCommand timeout in ms (default: 30 000) */\n timeout?: number;\n /** Pre-send validation (e.g. per-method item parsing for endpoints) */\n validate?: (params: any) => void;\n /** Custom response formatter. Default: mcpJson */\n formatResponse?: (result: unknown) => any;\n /** Per-method response formatters. Overrides formatResponse for specific methods. */\n methodFormatters?: Record<string, (result: unknown) => any>;\n}\n\n/** Standard batch result from Figma handlers */\nexport interface BatchResult<T = unknown> {\n results: Array<T | \"ok\" | { error: string }>;\n warnings?: string[];\n /** Set when some items were deferred (e.g. font loading cap exceeded) */\n deferred?: string;\n}\n\n/** Max response size in characters (~12K tokens). Prevents LLM client-side truncation that corrupts JSON. */\nconst MAX_RESPONSE_CHARS = 50_000;\n\n/** Format a successful MCP response (JSON). Returns a clean error if response exceeds safe size. */\nexport function mcpJson(data: unknown) {\n const text = JSON.stringify(data);\n if (text.length <= MAX_RESPONSE_CHARS) {\n return { content: [{ type: \"text\" as const, text }] };\n }\n return {\n content: [{\n type: \"text\" as const,\n text: JSON.stringify({\n _error: \"response_too_large\",\n _sizeKB: Math.round(text.length / 1024),\n warning: \"Response exceeds safe size. Use 'depth', 'fields', 'limit', or 'summaryOnly' parameters to reduce response size.\",\n }),\n }],\n };\n}\n\n/** Format an error MCP response */\nexport function mcpError(prefix: string, error: unknown) {\n const msg = error instanceof Error ? error.message : String(error);\n return { content: [{ type: \"text\" as const, text: `${prefix}: ${msg}` }] };\n}\n","// AUTO-GENERATED by schema compiler — do not edit\n\nexport const helpDirectory: string = \"# Available Endpoints\\n\\n[design-system]\\n components Create and manage reusable components and variant sets.\\n fonts Search available fonts in Figma.\\n instances Create and manage component instances.\\n styles CRUD for local paint, text, effect, and grid styles.\\n variable_collections CRUD for variable collections — the document-level API for design tokens.\\n variables Search and update design variables within a collection.\\n\\n[connection]\\n connection Manage the Figma plugin connection.\\n\\n[document]\\n document Navigate and manage Figma pages (canvases) in the document.\\n version_history Save named versions to the Figma file's version history.\\n\\n[creation]\\n frames Create and manage frames, shapes, auto-layout containers, sections, and SVG nodes.\\n text Create and manage text nodes.\\n\\n[quality]\\n lint Run design quality and accessibility checks.\\n\\n[interaction]\\n prototyping Manage prototype interactions, reactions, and navigation flows.\\n\\n[node-inspection]\\n selection Read and set the current Figma selection.\\n\\nTopics:\\n missing_tools Why create or edit tools are missing and how to fix it\\n\\nUse help(topic: \\\"<endpoint>\\\") for endpoint details.\\nUse help(topic: \\\"<endpoint>.<method>\\\") for method details.\";\n\nexport const helpEndpoints: Record<string, { summary: string; methods: Record<string, string> }> = {\n \"components\": {\n \"summary\": \"# components\\nCreate and manage reusable components and variant sets.\\n\\nMethods:\\n clone Duplicate nodes [create]\\n audit Run lint on a node — returns severity-ranked findings [read]\\n reparent Move nodes into a new parent [edit]\\n list List local component names (variant sets as single entries) [read]\\n get Get component detail — property definitions + ID for instances.create [read]\\n create Create components [create]\\n update Add, edit, or delete component properties [edit]\\n delete Delete components or component sets [edit]\\n\\n// depth: omit → id+name stubs | 0 → props + child stubs | N → recurse N | -1 → full tree\\n// fields: whitelist e.g. [\\\"fills\\\",\\\"opacity\\\"] — id, name, type always included. Pass [\\\"*\\\"] for all.\\n// layoutSizingHorizontal/Vertical: FIXED | HUG | FILL — how the node sizes within auto-layout.\\n// Colors: fillVariableName/strokeVariableName bind by name — preferred over raw color values.\\n// Note: node-based endpoints (frames, text, instances, components) use `results` as the list key.\\n// Standalone endpoints (styles, variables, variable_collections) use `items`. Components.list uses `items` (catalog view).\\n// ---\\n// visible: false hides the node. Omitted from response when true (the default).\\n// locked: true prevents editing in Figma UI. Omitted when false (the default).\\n// rotation: degrees (0-360). Omitted when 0.\\n// blendMode: layer blend mode. Omitted when PASS_THROUGH (the default).\\n// layoutPositioning: ABSOLUTE = floating inside auto-layout parent. Omitted when AUTO (the default).\\n// minWidth/maxWidth/minHeight/maxHeight: responsive constraints for auto-layout children.\\n// constraints: position behavior in non-auto-layout parents. Ignored inside auto-layout frames.\\n// bindings: bind design variables to node properties. field uses slash path: \\\"fills/0/color\\\" (first fill), \\\"strokes/0/color\\\", \\\"opacity\\\", \\\"width\\\", \\\"height\\\", \\\"cornerRadius\\\", \\\"paddingLeft\\\", \\\"itemSpacing\\\".\\n// explicitMode: pin a variable mode on this node. Use { collectionName, modeName } (preferred) or { collectionId, modeId }.\\n// properties: escape hatch — set any Figma node property directly. Use only when no dedicated field exists.\\ninterface Node {\\n id: string; name: string; type: string;\\n visible?: boolean; // omitted when true\\n locked?: boolean; // omitted when false\\n opacity?: number; // omitted when 1\\n rotation?: number; // omitted when 0\\n blendMode?: string; // omitted when PASS_THROUGH\\n layoutPositioning?: \\\"AUTO\\\" | \\\"ABSOLUTE\\\";\\n layoutSizingHorizontal?: \\\"FIXED\\\" | \\\"HUG\\\" | \\\"FILL\\\";\\n layoutSizingVertical?: \\\"FIXED\\\" | \\\"HUG\\\" | \\\"FILL\\\";\\n minWidth?: number; maxWidth?: number; minHeight?: number; maxHeight?: number;\\n absoluteBoundingBox: { x: number; y: number; width: number; height: number };\\n fills?: Paint[]; // solid: {type: \\\"SOLID\\\", color: {r, g, b, a}}\\n strokes?: Paint[];\\n effects?: Effect[]; // DROP_SHADOW | INNER_SHADOW | LAYER_BLUR | BACKGROUND_BLUR\\n children?: NodeStub[]; // stubs: {id, name, type} — use depth to expand\\n}\\n// PatchItem uses flat params matching create shape — no nested sub-objects.\\n// Fill/stroke/corner/layout/text params are identical to frames.create and text.create.\\n// Unknown keys produce a warning, preventing silent failures.\\n// Components are reusable design elements. Instances stay linked to the component and inherit changes.\\n// Workflow: create component (with properties) → add children → create instances via instances.create.\\n// ---\\n// A component set (variant set) groups related components as variants (e.g. Button/Primary, Button/Secondary).\\n// Property types: BOOLEAN (toggle visibility), TEXT (editable text), INSTANCE_SWAP (swap child instance), VARIANT (variant picker).\\n// exposeText: when creating from_node, text children become editable TEXT properties on the component.\\n// Auto-bind: TEXT properties auto-bind to text children with matching names (case-insensitive).\\n// Example: properties:[{propertyName:\\\"Label\\\", type:\\\"TEXT\\\", defaultValue:\\\"Click\\\"}] binds to a child text node named \\\"Label\\\".\\n// text.create accepts componentPropertyName to bind on creation — walks up ancestors to find the nearest component.\\n// For nested text (text inside frames inside a component), componentPropertyName resolves via ancestor walk. Alternatively, pass componentId explicitly.\\n// For existing nodes with many text children, prefer components(method:\\\"create\\\", type:\\\"from_node\\\", exposeText:true) — it auto-discovers, creates TEXT properties, and binds all text nodes in one operation.\\n// Property keys: read returns clean names (\\\"Label\\\"), write requires the #suffix (\\\"Label#1:0\\\"). Call components.get(id) to discover exact keys before edit/delete.\\n// ComponentItem accepts the same params as FrameItem (layout, fill, stroke, sizing, min/max).\\n// A component IS a frame — create it directly with all layout properties, then add children.\\n// SIZING: Components with text need a width constraint — set width + layoutSizingHorizontal:\\\"FIXED\\\".\\n// Without it, text won't wrap and the component grows unboundedly.\\n// HUG on both axes is only correct for intrinsically-sized elements (buttons, badges, icons).\\n// action: \\\"add\\\" (default) — requires type + defaultValue. \\\"edit\\\" — pass defaultValue to change value, name to rename property. \\\"delete\\\" — just propertyName#suffix.\\n// action: \\\"rename_variant\\\" — renames a variant option VALUE (not the property). Pass defaultValue=current option name, name=new option name.\\n// For VARIANT properties: \\\"edit\\\" with defaultValue reorders children to set the default variant.\\n\\nUse components(method: \\\"help\\\", topic: \\\"<method>\\\") for method details.\",\n \"methods\": {\n \"clone\": \"# components.clone\\nDuplicate nodes\\n\\nParams:\\n id (string, required) — Node ID\\n parentId (string, optional) — Parent node ID. Omit to place on current page.\\n x (number, optional) — X position (default: 0)\\n y (number, optional) — Y position (default: 0)\\n depth (number, optional) — Response detail: omit for id+name only. 0=properties + child stubs. N=recurse N levels. -1=unlimited.\",\n \"audit\": \"# components.audit\\nRun lint on a node — returns severity-ranked findings\\n\\nParams:\\n id (string, required) — Node ID to audit\\n rules (string[], optional) — Rules to check. Default: [\\\"all\\\"]. Categories: \\\"component\\\", \\\"composition\\\", \\\"token\\\", \\\"naming\\\", \\\"wcag\\\".\\n maxDepth (number, optional) — Max tree depth (default: 10)\\n maxFindings (number, optional) — Max findings (default: 50)\",\n \"reparent\": \"# components.reparent\\nMove nodes into a new parent\\n\\nParams:\\n items (array, required) — Array of {id, parentId, index?}\\n id (string, required)\\n parentId (string, required)\\n index (number, optional)\",\n \"list\": \"# components.list\\nList local component names (variant sets as single entries)\\n\\nParams:\\n query (string, optional) — Name search query (case-insensitive substring match)\\n offset (number, optional) — Skip N items for pagination (default 0)\\n limit (number, optional) — Max items per page (default 100)\",\n \"get\": \"# components.get\\nGet component detail — property definitions + ID for instances.create\\n\\nParams:\\n id (string, optional) — Component or component set ID\\n names (string[], optional) — Batch lookup by name (case-insensitive). Either id or names is required.\",\n \"create\": \"# components.create\\nCreate components\\n\\nExample: components(method:\\\"create\\\", type:\\\"component\\\", items:[{name:\\\"Card\\\", layoutMode:\\\"VERTICAL\\\", padding:\\\"16\\\", itemSpacing:\\\"8\\\", fillVariableName:\\\"bg/surface\\\", children:[{type:\\\"text\\\", text:\\\"Title\\\", componentPropertyName:\\\"Title\\\"}, {type:\\\"text\\\", text:\\\"Description\\\", fontSize:14, componentPropertyName:\\\"Description\\\"}], properties:[{propertyName:\\\"Show Icon\\\", type:\\\"BOOLEAN\\\", defaultValue:true}]}])\\n\\nDiscriminant: type (component | from_node | variant_set)\\n\\n ## component — Create component with full frame properties (layout, fill, stroke, sizing). A component IS a frame — build directly, no need to create a frame first.\\n name (string, required) — Component name\\n parentId (string, optional) — Parent node ID. Omit to place on current page.\\n x (number, optional) — X position (default: 0)\\n y (number, optional) — Y position (default: 0)\\n width (number, optional) — Width (default: 100)\\n height (number, optional) — Height (default: 100)\\n rotation (number, optional) — Rotation in degrees (0-360)\\n opacity (string, optional) — Opacity (0-1) or variable name\\n visible (boolean, optional) — Show/hide (default true)\\n locked (boolean, optional) — Lock/unlock (default false)\\n blendMode (PASS_THROUGH | NORMAL | DARKEN | MULTIPLY | LINEAR_BURN | COLOR_BURN | LIGHTEN | SCREEN | LINEAR_DODGE | COLOR_DODGE | OVERLAY | SOFT_LIGHT | HARD_LIGHT | DIFFERENCE | EXCLUSION | HUE | SATURATION | COLOR | LUMINOSITY, optional)\\n layoutPositioning (AUTO | ABSOLUTE, optional) — ABSOLUTE = floating inside auto-layout parent\\n fills (array, optional) — Fill paints array — e.g. [{type: 'SOLID', color: '#hex'}] or [] for transparent. Primary way to set fills.\\n fillColor (Color, optional) — Shorthand — sets a single solid fill (auto-binds to matching variable/style)\\n fillStyleName (string, optional) — Paint style name for fill\\n fillVariableName (string, optional) — Color variable by name e.g. 'bg/primary'\\n strokes (array, optional) — Stroke paints array — e.g. [{type: 'SOLID', color: '#hex'}] or [] to clear. Primary way to set strokes.\\n strokeColor (Color, optional) — Shorthand — sets a single solid stroke (auto-binds to matching variable/style)\\n strokeStyleName (string, optional) — Paint style name for stroke\\n strokeVariableName (string, optional) — Color variable by name for stroke\\n strokeWeight (string, optional) — All sides (number) or variable name (string). Per-side: strokeTopWeight, strokeBottomWeight, strokeLeftWeight, strokeRightWeight.\\n strokeTopWeight (string, optional)\\n strokeBottomWeight (string, optional)\\n strokeLeftWeight (string, optional)\\n strokeRightWeight (string, optional)\\n strokeAlign (INSIDE | OUTSIDE | CENTER, optional) — Stroke position (default: INSIDE)\\n strokesIncludedInLayout (boolean, optional) — Include stroke width in layout measurements (default: false)\\n cornerRadius (string, optional) — All corners (number) or variable name (string). Per-corner: topLeftRadius, topRightRadius, bottomRightRadius, bottomLeftRadius.\\n topLeftRadius (string, optional)\\n topRightRadius (string, optional)\\n bottomRightRadius (string, optional)\\n bottomLeftRadius (string, optional)\\n effectStyleName (string, optional) — Effect style name (e.g. 'Shadow/Card') for shadows, blurs\\n layoutMode (NONE | HORIZONTAL | VERTICAL, optional) — Layout direction (default: NONE)\\n layoutWrap (NO_WRAP | WRAP, optional)\\n padding (string, optional) — All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft.\\n paddingTop (string, optional)\\n paddingRight (string, optional)\\n paddingBottom (string, optional)\\n paddingLeft (string, optional)\\n primaryAxisAlignItems (MIN | MAX | CENTER | SPACE_BETWEEN, optional)\\n counterAxisAlignItems (MIN | MAX | CENTER | BASELINE, optional)\\n layoutSizingHorizontal (FIXED | HUG | FILL, optional)\\n layoutSizingVertical (FIXED | HUG | FILL, optional)\\n itemSpacing (string, optional) — Spacing between children (number or variable name string, default: 0)\\n counterAxisSpacing (string, optional) — Gap between wrapped rows (requires layoutWrap: WRAP)\\n minWidth (number, optional) — Min width for responsive auto-layout\\n maxWidth (number, optional) — Max width for responsive auto-layout\\n minHeight (number, optional) — Min height for responsive auto-layout\\n maxHeight (number, optional) — Max height for responsive auto-layout\\n overflowDirection (NONE | HORIZONTAL | VERTICAL | BOTH, optional) — Scroll overflow in prototype (default: NONE)\\n description (string, optional) — Component description (shown in Figma's component panel)\\n children (array, optional) — Inline child nodes. Text: {type:\\\"text\\\", text, componentPropertyName?, fontFamily?, fontSize?, fontColor?}. Frame: {type:\\\"frame\\\", name?, layoutMode?, fillColor?, children?}. Text with componentPropertyName auto-creates and binds a TEXT property — no need to add it to properties separately.\\n properties (array, optional) — Component properties to define at creation: [{propertyName, type, defaultValue}]. TEXT properties for inline children with componentPropertyName are created automatically.\\n propertyName (string, required) — Property name\\n type (BOOLEAN | TEXT | INSTANCE_SWAP, required) — Property type\\n defaultValue (string_or_boolean, required) — Default value\\n preferredValues (array, optional) — Preferred values for INSTANCE_SWAP\\n\\n ## from_node — Convert existing nodes to components. Text children auto-exposed as editable properties (exposeText: true).\\n nodeId (string, required) — Node ID to convert\\n exposeText (boolean, optional) — Auto-expose text as editable properties (default: true)\\n\\n ## variant_set — Combine components into a variant set. The resulting set is a frame — accepts all frame properties for layout/styling.\\n name (string, optional) — Node name\\n parentId (string, optional) — Parent node ID. Omit to place on current page.\\n x (number, optional) — X position (default: 0)\\n y (number, optional) — Y position (default: 0)\\n width (number, optional) — Width (default: 100)\\n height (number, optional) — Height (default: 100)\\n rotation (number, optional) — Rotation in degrees (0-360)\\n opacity (string, optional) — Opacity (0-1) or variable name\\n visible (boolean, optional) — Show/hide (default true)\\n locked (boolean, optional) — Lock/unlock (default false)\\n blendMode (PASS_THROUGH | NORMAL | DARKEN | MULTIPLY | LINEAR_BURN | COLOR_BURN | LIGHTEN | SCREEN | LINEAR_DODGE | COLOR_DODGE | OVERLAY | SOFT_LIGHT | HARD_LIGHT | DIFFERENCE | EXCLUSION | HUE | SATURATION | COLOR | LUMINOSITY, optional)\\n layoutPositioning (AUTO | ABSOLUTE, optional) — ABSOLUTE = floating inside auto-layout parent\\n fills (array, optional) — Fill paints array — e.g. [{type: 'SOLID', color: '#hex'}] or [] for transparent. Primary way to set fills.\\n fillColor (Color, optional) — Shorthand — sets a single solid fill (auto-binds to matching variable/style)\\n fillStyleName (string, optional) — Paint style name for fill\\n fillVariableName (string, optional) — Color variable by name e.g. 'bg/primary'\\n strokes (array, optional) — Stroke paints array — e.g. [{type: 'SOLID', color: '#hex'}] or [] to clear. Primary way to set strokes.\\n strokeColor (Color, optional) — Shorthand — sets a single solid stroke (auto-binds to matching variable/style)\\n strokeStyleName (string, optional) — Paint style name for stroke\\n strokeVariableName (string, optional) — Color variable by name for stroke\\n strokeWeight (string, optional) — All sides (number) or variable name (string). Per-side: strokeTopWeight, strokeBottomWeight, strokeLeftWeight, strokeRightWeight.\\n strokeTopWeight (string, optional)\\n strokeBottomWeight (string, optional)\\n strokeLeftWeight (string, optional)\\n strokeRightWeight (string, optional)\\n strokeAlign (INSIDE | OUTSIDE | CENTER, optional) — Stroke position (default: INSIDE)\\n strokesIncludedInLayout (boolean, optional) — Include stroke width in layout measurements (default: false)\\n cornerRadius (string, optional) — All corners (number) or variable name (string). Per-corner: topLeftRadius, topRightRadius, bottomRightRadius, bottomLeftRadius.\\n topLeftRadius (string, optional)\\n topRightRadius (string, optional)\\n bottomRightRadius (string, optional)\\n bottomLeftRadius (string, optional)\\n effectStyleName (string, optional) — Effect style name (e.g. 'Shadow/Card') for shadows, blurs\\n layoutMode (NONE | HORIZONTAL | VERTICAL, optional) — Layout direction (default: NONE)\\n layoutWrap (NO_WRAP | WRAP, optional)\\n padding (string, optional) — All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft.\\n paddingTop (string, optional)\\n paddingRight (string, optional)\\n paddingBottom (string, optional)\\n paddingLeft (string, optional)\\n primaryAxisAlignItems (MIN | MAX | CENTER | SPACE_BETWEEN, optional)\\n counterAxisAlignItems (MIN | MAX | CENTER | BASELINE, optional)\\n layoutSizingHorizontal (FIXED | HUG | FILL, optional)\\n layoutSizingVertical (FIXED | HUG | FILL, optional)\\n itemSpacing (string, optional) — Spacing between children (number or variable name string, default: 0)\\n counterAxisSpacing (string, optional) — Gap between wrapped rows (requires layoutWrap: WRAP)\\n minWidth (number, optional) — Min width for responsive auto-layout\\n maxWidth (number, optional) — Max width for responsive auto-layout\\n minHeight (number, optional) — Min height for responsive auto-layout\\n maxHeight (number, optional) — Max height for responsive auto-layout\\n overflowDirection (NONE | HORIZONTAL | VERTICAL | BOTH, optional) — Scroll overflow in prototype (default: NONE)\\n componentIds (string[], required) — Component IDs to combine (min 2)\\n variantPropertyName (string, optional) — Rename the auto-generated variant property (default: 'Property 1')\",\n \"update\": \"# components.update\\nAdd, edit, or delete component properties\\n\\nExample: components(method:\\\"update\\\", items:[{id:\\\"1:23\\\", propertyName:\\\"Label\\\", action:\\\"edit\\\", defaultValue:\\\"Click Me\\\"}])\\n\\nParams:\\n items (UpdatePropertyItem[], required) — Array of {id, propertyName, action?, type?, defaultValue?, name?, preferredValues?}\\n id (string, required) — Component or component set ID\\n propertyName (string, required) — Property name with #suffix for edit/delete (e.g. \\\"Label#1:0\\\"). Call components.get to find exact keys. For add, plain name works.\\n action (add | edit | delete | rename_variant, optional) — \\\"add\\\" (default): requires type + defaultValue. \\\"edit\\\": pass defaultValue to change default, name to rename property. \\\"delete\\\": just propertyName. \\\"rename_variant\\\": pass defaultValue=current option name, name=new option name.\\n type (BOOLEAN | TEXT | INSTANCE_SWAP | VARIANT, optional) — Property type (required for add)\\n defaultValue (string_or_boolean, optional) — Default value (add/edit). For rename_variant: the CURRENT option name to rename\\n name (string, optional) — New name — for edit: renames the property itself, for rename_variant: the new option value name\\n preferredValues (array, optional) — Preferred values for INSTANCE_SWAP\\n depth (number, optional) — Response detail: omit for id+name only. 0=properties + child stubs. N=recurse N levels. -1=unlimited.\",\n \"delete\": \"# components.delete\\nDelete components or component sets\\n\\nParams:\\n id (string, required) — Component or component set ID\"\n }\n },\n \"connection\": {\n \"summary\": \"# connection\\nManage the Figma plugin connection.\\n\\nMethods:\\n create Join a relay channel (required first step before any other tool) [read]\\n get Verify end-to-end connection to Figma [read]\\n list Inspect which clients (MCP, plugin) are connected to each channel [read]\\n delete Disconnect all clients (MCP server and Figma plugin) from a channel and reset its state [edit]\\n\\n// Connection manages the WebSocket link between the MCP server and the Figma plugin.\\n// Channels are named rooms — both the MCP server and Figma plugin must join the same channel to communicate.\\n// Workflow: connection(method:\\\"create\\\") to join a channel → connection(method:\\\"get\\\") to verify Figma plugin is connected.\\n// If get times out (5s), the Figma plugin is not running or not on the same channel.\\n// list shows all active channels and their connected clients. delete factory-resets a channel.\\n\\nUse connection(method: \\\"help\\\", topic: \\\"<method>\\\") for method details.\",\n \"methods\": {\n \"create\": \"# connection.create\\nJoin a relay channel (required first step before any other tool)\\n\\nParams:\\n channel (string, optional) — The channel name displayed in the Figma plugin panel. Defaults to 'vibma' if omitted.\",\n \"get\": \"# connection.get\\nVerify end-to-end connection to Figma\\n\\nNo params.\",\n \"list\": \"# connection.list\\nInspect which clients (MCP, plugin) are connected to each channel\\n\\nNo params.\",\n \"delete\": \"# connection.delete\\nDisconnect all clients (MCP server and Figma plugin) from a channel and reset its state\\n\\nParams:\\n channel (string, optional) — Channel to reset. Defaults to 'vibma'.\"\n }\n },\n \"document\": {\n \"summary\": \"# document\\nNavigate and manage Figma pages (canvases) in the document.\\n\\nMethods:\\n get Get current page with top-level children [read]\\n list Get document name and list all pages [read]\\n set Switch to a page by ID or name. At least one of pageId or pageName must be provided. [read]\\n create Create a new page [create]\\n update Rename a page [edit]\\n\\n// A Figma document contains pages — each page is an independent canvas with its own node tree.\\n// The \\\"current page\\\" is where all node operations happen. Use document.set to switch pages before working with nodes.\\n// Page IDs look like \\\"0:1\\\", \\\"1:1\\\", etc. The first page is always \\\"0:1\\\".\\n// get returns the current page with its top-level children as stubs. list returns all pages in the document.\\n\\nUse document(method: \\\"help\\\", topic: \\\"<method>\\\") for method details.\",\n \"methods\": {\n \"get\": \"# document.get\\nGet current page with top-level children\\n\\nNo params.\",\n \"list\": \"# document.list\\nGet document name and list all pages\\n\\nNo params.\",\n \"set\": \"# document.set\\nSwitch to a page by ID or name. At least one of pageId or pageName must be provided.\\n\\nParams:\\n pageId (string, optional) — Page ID\\n pageName (string, optional) — Page name (case-insensitive, substring match)\",\n \"create\": \"# document.create\\nCreate a new page\\n\\nParams:\\n name (string, optional) — Page name (default: 'New Page')\",\n \"update\": \"# document.update\\nRename a page\\n\\nParams:\\n newName (string, required) — New page name\\n pageId (string, optional) — Page ID (default: current page)\"\n }\n },\n \"fonts\": {\n \"summary\": \"# fonts\\nSearch available fonts in Figma.\\n\\nMethods:\\n list List available font families, optionally filtered by name [read]\\n\\n// Returns font family names installed in the Figma environment. Use to verify a fontFamily before text.create or styles.create.\\n// query filters by family name substring (case-insensitive), e.g. query:\\\"inter\\\" matches \\\"Inter\\\", \\\"Inter Tight\\\".\\n// ---\\n// Default response: just family names. Set includeStyles:true to also get available styles per family (e.g. \\\"Regular\\\", \\\"Bold\\\", \\\"Italic\\\").\\n// Use fonts.list with query to narrow results before creating text with specific fontFamily + fontStyle.\\n\\nUse fonts(method: \\\"help\\\", topic: \\\"<method>\\\") for method details.\",\n \"methods\": {\n \"list\": \"# fonts.list\\nList available font families, optionally filtered by name\\n\\nExample: fonts(method:\\\"list\\\", query:\\\"inter\\\")\\n\\nParams:\\n query (string, optional) — Filter by family name (case-insensitive substring)\\n includeStyles (boolean, optional) — Include available styles per family (default: false)\\n offset (number, optional) — Skip N items for pagination (default 0)\\n limit (number, optional) — Max items per page (default 100)\"\n }\n },\n \"frames\": {\n \"summary\": \"# frames\\nCreate and manage frames, shapes, auto-layout containers, sections, and SVG nodes.\\n\\nMethods:\\n get Get serialized node data [read]\\n list Search for nodes (returns stubs only — use get with depth for full properties) [read]\\n update Patch node properties [edit]\\n delete Delete nodes [edit]\\n clone Duplicate nodes [create]\\n audit Run lint on a node — returns severity-ranked findings [read]\\n reparent Move nodes into a new parent [edit]\\n create Create frame-like containers [create]\\n export Export a node as PNG, JPG, SVG, SVG_STRING, or PDF [read]\\n\\n// depth: omit → id+name stubs | 0 → props + child stubs | N → recurse N | -1 → full tree\\n// fields: whitelist e.g. [\\\"fills\\\",\\\"opacity\\\"] — id, name, type always included. Pass [\\\"*\\\"] for all.\\n// layoutSizingHorizontal/Vertical: FIXED | HUG | FILL — how the node sizes within auto-layout.\\n// Colors: fillVariableName/strokeVariableName bind by name — preferred over raw color values.\\n// Note: node-based endpoints (frames, text, instances, components) use `results` as the list key.\\n// Standalone endpoints (styles, variables, variable_collections) use `items`. Components.list uses `items` (catalog view).\\n// ---\\n// visible: false hides the node. Omitted from response when true (the default).\\n// locked: true prevents editing in Figma UI. Omitted when false (the default).\\n// rotation: degrees (0-360). Omitted when 0.\\n// blendMode: layer blend mode. Omitted when PASS_THROUGH (the default).\\n// layoutPositioning: ABSOLUTE = floating inside auto-layout parent. Omitted when AUTO (the default).\\n// minWidth/maxWidth/minHeight/maxHeight: responsive constraints for auto-layout children.\\n// constraints: position behavior in non-auto-layout parents. Ignored inside auto-layout frames.\\n// bindings: bind design variables to node properties. field uses slash path: \\\"fills/0/color\\\" (first fill), \\\"strokes/0/color\\\", \\\"opacity\\\", \\\"width\\\", \\\"height\\\", \\\"cornerRadius\\\", \\\"paddingLeft\\\", \\\"itemSpacing\\\".\\n// explicitMode: pin a variable mode on this node. Use { collectionName, modeName } (preferred) or { collectionId, modeId }.\\n// properties: escape hatch — set any Figma node property directly. Use only when no dedicated field exists.\\ninterface Node {\\n id: string; name: string; type: string;\\n visible?: boolean; // omitted when true\\n locked?: boolean; // omitted when false\\n opacity?: number; // omitted when 1\\n rotation?: number; // omitted when 0\\n blendMode?: string; // omitted when PASS_THROUGH\\n layoutPositioning?: \\\"AUTO\\\" | \\\"ABSOLUTE\\\";\\n layoutSizingHorizontal?: \\\"FIXED\\\" | \\\"HUG\\\" | \\\"FILL\\\";\\n layoutSizingVertical?: \\\"FIXED\\\" | \\\"HUG\\\" | \\\"FILL\\\";\\n minWidth?: number; maxWidth?: number; minHeight?: number; maxHeight?: number;\\n absoluteBoundingBox: { x: number; y: number; width: number; height: number };\\n fills?: Paint[]; // solid: {type: \\\"SOLID\\\", color: {r, g, b, a}}\\n strokes?: Paint[];\\n effects?: Effect[]; // DROP_SHADOW | INNER_SHADOW | LAYER_BLUR | BACKGROUND_BLUR\\n children?: NodeStub[]; // stubs: {id, name, type} — use depth to expand\\n}\\n// PatchItem uses flat params matching create shape — no nested sub-objects.\\n// Fill/stroke/corner/layout/text params are identical to frames.create and text.create.\\n// Unknown keys produce a warning, preventing silent failures.\\n// Frames are the primary container in Figma. Use auto_layout for responsive containers.\\n// Sizing: FIXED = explicit size, HUG = shrink to children, FILL = expand to fill parent.\\n// Fill: pass fills:[{type:\\\"SOLID\\\", color:\\\"#hex\\\"}] or [] for transparent. Shorthand: fillColor:\\\"#3B82F6\\\" (auto-binds to matching variable/style).\\n// Also: fillVariableName:\\\"bg/primary\\\", fillStyleName:\\\"Surface/Primary\\\".\\n// Stroke: pass strokes:[{type:\\\"SOLID\\\", color:\\\"#hex\\\"}] or [] to clear. Shorthand: strokeColor:\\\"#000\\\", strokeVariableName:\\\"border/default\\\".\\n// Token fields (cornerRadius, opacity, itemSpacing, padding, strokeWeight): pass number for value, string for variable name/ID.\\n// ---\\n// SIZING: Always think about both axes. Containers with text need a width constraint — set width + layoutSizingHorizontal:\\\"FIXED\\\".\\n// HUG/HUG is only correct for intrinsically-sized elements (buttons, badges, icons).\\n// Smart defaults inside auto-layout parent: cross-axis defaults to FILL, primary axis stays HUG.\\n// FILL only works inside an auto-layout parent. Use FIXED for top-level frames.\\n// minWidth/maxWidth/minHeight/maxHeight: responsive constraints for auto-layout children.\\n// clipsContent: true (default) clips children to the frame bounds. Set false for overflow-visible.\\n// Sections are top-level organizers (like artboards) — they cannot be nested inside frames.\\n// Shape primitives: rectangle, ellipse, line — for decorative/visual elements (not containers).\\n// group: wraps existing nodes into a Group. boolean_operation: UNION/SUBTRACT/INTERSECT/EXCLUDE combines shapes.\\n// SVG create: pass raw SVG markup string (e.g. \\\"<svg>...</svg>\\\") — Figma converts it to vector nodes.\\n\\nUse frames(method: \\\"help\\\", topic: \\\"<method>\\\") for method details.\",\n \"methods\": {\n \"get\": \"# frames.get\\nGet serialized node data\\n\\nParams:\\n id (string, required) — Node ID\\n fields (string[], optional) — Property whitelist. Identity fields (id, name, type) always included. Omit for stubs on list, full on get. Pass [\\\"*\\\"] for all.\\n depth (number, optional) — Response detail: omit for id+name only. 0=properties + child stubs. N=recurse N levels. -1=unlimited.\\n verbose (boolean, optional) — Include all properties (bounding box, constraints, text style details). Default false — returns slim, actionable output.\",\n \"list\": \"# frames.list\\nSearch for nodes (returns stubs only — use get with depth for full properties)\\n\\nParams:\\n query (string, optional) — Name search query (case-insensitive substring match)\\n types (string[], optional) — Filter by node types (e.g. [\\\"FRAME\\\", \\\"TEXT\\\"])\\n parentId (string, optional) — Search only within this subtree\\n fields (string[], optional) — Property whitelist. Identity fields (id, name, type) always included. Omit for stubs on list, full on get. Pass [\\\"*\\\"] for all.\\n offset (number, optional) — Skip N items for pagination (default 0)\\n limit (number, optional) — Max items per page (default 100)\",\n \"update\": \"# frames.update\\nPatch node properties\\n\\nParams:\\n items (PatchItem[], required) — Array of {id, ...properties} to patch\\n fills (array, optional) — Fill paints array — e.g. [{type: 'SOLID', color: '#hex'}] or [] for transparent. Primary way to set fills.\\n fillColor (Color, optional) — Shorthand — sets a single solid fill (auto-binds to matching variable/style)\\n fillStyleName (string, optional) — Paint style name for fill\\n fillVariableName (string, optional) — Color variable by name e.g. 'bg/primary'\\n strokes (array, optional) — Stroke paints array — e.g. [{type: 'SOLID', color: '#hex'}] or [] to clear. Primary way to set strokes.\\n strokeColor (Color, optional) — Shorthand — sets a single solid stroke (auto-binds to matching variable/style)\\n strokeStyleName (string, optional) — Paint style name for stroke\\n strokeVariableName (string, optional) — Color variable by name for stroke\\n strokeWeight (string, optional) — All sides (number) or variable name (string). Per-side: strokeTopWeight, strokeBottomWeight, strokeLeftWeight, strokeRightWeight.\\n strokeTopWeight (string, optional)\\n strokeBottomWeight (string, optional)\\n strokeLeftWeight (string, optional)\\n strokeRightWeight (string, optional)\\n strokeAlign (INSIDE | OUTSIDE | CENTER, optional) — Stroke position (default: INSIDE)\\n strokesIncludedInLayout (boolean, optional) — Include stroke width in layout measurements (default: false)\\n cornerRadius (string, optional) — All corners (number) or variable name (string). Per-corner: topLeftRadius, topRightRadius, bottomRightRadius, bottomLeftRadius.\\n topLeftRadius (string, optional)\\n topRightRadius (string, optional)\\n bottomRightRadius (string, optional)\\n bottomLeftRadius (string, optional)\\n opacity (string, optional) — Opacity (0-1) or variable name\\n visible (boolean, optional) — Show/hide (default true)\\n locked (boolean, optional) — Lock/unlock (default false)\\n blendMode (PASS_THROUGH | NORMAL | DARKEN | MULTIPLY | LINEAR_BURN | COLOR_BURN | LIGHTEN | SCREEN | LINEAR_DODGE | COLOR_DODGE | OVERLAY | SOFT_LIGHT | HARD_LIGHT | DIFFERENCE | EXCLUSION | HUE | SATURATION | COLOR | LUMINOSITY, optional)\\n effectStyleName (string, optional) — Effect style name (e.g. 'Shadow/Card') for shadows, blurs\\n layoutMode (NONE | HORIZONTAL | VERTICAL, optional) — Layout direction (default: NONE)\\n layoutWrap (NO_WRAP | WRAP, optional)\\n padding (string, optional) — All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft.\\n paddingTop (string, optional)\\n paddingRight (string, optional)\\n paddingBottom (string, optional)\\n paddingLeft (string, optional)\\n primaryAxisAlignItems (MIN | MAX | CENTER | SPACE_BETWEEN, optional)\\n counterAxisAlignItems (MIN | MAX | CENTER | BASELINE, optional)\\n itemSpacing (string, optional) — Spacing between children (number or variable name string, default: 0)\\n counterAxisSpacing (string, optional) — Gap between wrapped rows (requires layoutWrap: WRAP)\\n layoutSizingHorizontal (FIXED | HUG | FILL, optional)\\n layoutSizingVertical (FIXED | HUG | FILL, optional)\\n layoutPositioning (AUTO | ABSOLUTE, optional) — ABSOLUTE = floating inside auto-layout parent\\n minWidth (number, optional) — Min width for responsive auto-layout\\n maxWidth (number, optional) — Max width for responsive auto-layout\\n minHeight (number, optional) — Min height for responsive auto-layout\\n maxHeight (number, optional) — Max height for responsive auto-layout\\n fontSize (number, optional) — Font size\\n fontFamily (string, optional) — Font family\\n fontStyle (string, optional) — Font variant e.g. \\\"Bold\\\", \\\"Italic\\\" — overrides fontWeight\\n fontWeight (number, optional) — 100-900. Ignored when fontStyle is set.\\n fontColor (Color, optional) — Shorthand — sets text color (auto-binds to matching variable/style)\\n fontColorVariableName (string, optional) — Bind color variable by name e.g. 'text/primary'\\n fontColorStyleName (string, optional) — Apply paint style — overrides fontColor\\n textStyleId (string, optional) — Apply text style by ID — overrides fontSize/fontWeight\\n textStyleName (string, optional) — Text style by name (case-insensitive)\\n textAlignHorizontal (LEFT | CENTER | RIGHT | JUSTIFIED, optional)\\n textAlignVertical (TOP | CENTER | BOTTOM, optional)\\n textAutoResize (NONE | WIDTH_AND_HEIGHT | HEIGHT | TRUNCATE, optional)\\n id (string, required)\\n name (string, optional) — Rename node\\n rotation (number, optional) — Degrees (0-360)\\n x (number, optional)\\n y (number, optional)\\n width (number, optional)\\n height (number, optional)\\n clearFill (boolean, optional) — Remove all fills\\n effects (array, optional) — Effect array (DROP_SHADOW, INNER_SHADOW, LAYER_BLUR, BACKGROUND_BLUR)\\n overflowDirection (NONE | HORIZONTAL | VERTICAL | BOTH, optional) — Scroll overflow in prototype (default: NONE)\\n constraints (object, optional)\\n bindings (array, optional) — Bind variables to properties. field path examples: 'fills/0/color', 'strokes/0/color', 'opacity', 'width', 'cornerRadius', 'itemSpacing'.\\n field (string, required)\\n variableName (string, optional)\\n variableId (string, optional)\\n explicitMode (object, optional) — Pin variable mode — use { collectionName, modeName } (preferred) or { collectionId, modeId }\\n exportSettings (array, optional) — Export settings\\n properties (object, optional) — Direct Figma API props (escape hatch)\",\n \"delete\": \"# frames.delete\\nDelete nodes\\n\\nParams:\\n id (string, optional) — Single node ID\\n items (array, optional) — Batch: [{id}, ...]\\n id (string, optional)\",\n \"clone\": \"# frames.clone\\nDuplicate nodes\\n\\nParams:\\n id (string, required) — Node ID\\n parentId (string, optional) — Parent node ID. Omit to place on current page.\\n x (number, optional) — X position (default: 0)\\n y (number, optional) — Y position (default: 0)\\n depth (number, optional) — Response detail: omit for id+name only. 0=properties + child stubs. N=recurse N levels. -1=unlimited.\",\n \"audit\": \"# frames.audit\\nRun lint on a node — returns severity-ranked findings\\n\\nParams:\\n id (string, required) — Node ID to audit\\n rules (string[], optional) — Rules to check. Default: [\\\"all\\\"]. Categories: \\\"component\\\", \\\"composition\\\", \\\"token\\\", \\\"naming\\\", \\\"wcag\\\".\\n maxDepth (number, optional) — Max tree depth (default: 10)\\n maxFindings (number, optional) — Max findings (default: 50)\",\n \"reparent\": \"# frames.reparent\\nMove nodes into a new parent\\n\\nParams:\\n items (array, required) — Array of {id, parentId, index?}\\n id (string, required)\\n parentId (string, required)\\n index (number, optional)\",\n \"create\": \"# frames.create\\nCreate frame-like containers\\n\\nExample: frames(method:\\\"create\\\", type:\\\"auto_layout\\\", layoutMode:\\\"VERTICAL\\\", itemSpacing:16, padding:24)\\n\\nDiscriminant: type (frame | auto_layout | section | rectangle | ellipse | line | group | boolean_operation | svg)\\n\\n ## frame — Static frame with fixed dimensions\\n name (string, optional) — Node name\\n parentId (string, optional) — Parent node ID. Omit to place on current page.\\n x (number, optional) — X position (default: 0)\\n y (number, optional) — Y position (default: 0)\\n width (number, optional) — Width (default: 100)\\n height (number, optional) — Height (default: 100)\\n rotation (number, optional) — Rotation in degrees (0-360)\\n opacity (string, optional) — Opacity (0-1) or variable name\\n visible (boolean, optional) — Show/hide (default true)\\n locked (boolean, optional) — Lock/unlock (default false)\\n blendMode (PASS_THROUGH | NORMAL | DARKEN | MULTIPLY | LINEAR_BURN | COLOR_BURN | LIGHTEN | SCREEN | LINEAR_DODGE | COLOR_DODGE | OVERLAY | SOFT_LIGHT | HARD_LIGHT | DIFFERENCE | EXCLUSION | HUE | SATURATION | COLOR | LUMINOSITY, optional)\\n layoutPositioning (AUTO | ABSOLUTE, optional) — ABSOLUTE = floating inside auto-layout parent\\n fills (array, optional) — Fill paints array — e.g. [{type: 'SOLID', color: '#hex'}] or [] for transparent. Primary way to set fills.\\n fillColor (Color, optional) — Shorthand — sets a single solid fill (auto-binds to matching variable/style)\\n fillStyleName (string, optional) — Paint style name for fill\\n fillVariableName (string, optional) — Color variable by name e.g. 'bg/primary'\\n strokes (array, optional) — Stroke paints array — e.g. [{type: 'SOLID', color: '#hex'}] or [] to clear. Primary way to set strokes.\\n strokeColor (Color, optional) — Shorthand — sets a single solid stroke (auto-binds to matching variable/style)\\n strokeStyleName (string, optional) — Paint style name for stroke\\n strokeVariableName (string, optional) — Color variable by name for stroke\\n strokeWeight (string, optional) — All sides (number) or variable name (string). Per-side: strokeTopWeight, strokeBottomWeight, strokeLeftWeight, strokeRightWeight.\\n strokeTopWeight (string, optional)\\n strokeBottomWeight (string, optional)\\n strokeLeftWeight (string, optional)\\n strokeRightWeight (string, optional)\\n strokeAlign (INSIDE | OUTSIDE | CENTER, optional) — Stroke position (default: INSIDE)\\n strokesIncludedInLayout (boolean, optional) — Include stroke width in layout measurements (default: false)\\n cornerRadius (string, optional) — All corners (number) or variable name (string). Per-corner: topLeftRadius, topRightRadius, bottomRightRadius, bottomLeftRadius.\\n topLeftRadius (string, optional)\\n topRightRadius (string, optional)\\n bottomRightRadius (string, optional)\\n bottomLeftRadius (string, optional)\\n effectStyleName (string, optional) — Effect style name (e.g. 'Shadow/Card') for shadows, blurs\\n layoutMode (NONE | HORIZONTAL | VERTICAL, optional) — Layout direction (default: NONE)\\n layoutWrap (NO_WRAP | WRAP, optional)\\n padding (string, optional) — All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft.\\n paddingTop (string, optional)\\n paddingRight (string, optional)\\n paddingBottom (string, optional)\\n paddingLeft (string, optional)\\n primaryAxisAlignItems (MIN | MAX | CENTER | SPACE_BETWEEN, optional)\\n counterAxisAlignItems (MIN | MAX | CENTER | BASELINE, optional)\\n layoutSizingHorizontal (FIXED | HUG | FILL, optional)\\n layoutSizingVertical (FIXED | HUG | FILL, optional)\\n itemSpacing (string, optional) — Spacing between children (number or variable name string, default: 0)\\n counterAxisSpacing (string, optional) — Gap between wrapped rows (requires layoutWrap: WRAP)\\n minWidth (number, optional) — Min width for responsive auto-layout\\n maxWidth (number, optional) — Max width for responsive auto-layout\\n minHeight (number, optional) — Min height for responsive auto-layout\\n maxHeight (number, optional) — Max height for responsive auto-layout\\n overflowDirection (NONE | HORIZONTAL | VERTICAL | BOTH, optional) — Scroll overflow in prototype (default: NONE)\\n clipsContent (boolean, optional)\\n\\n ## auto_layout — Auto-layout frame that arranges children automatically\\n name (string, optional) — Node name\\n parentId (string, optional) — Parent node ID. Omit to place on current page.\\n x (number, optional) — X position (default: 0)\\n y (number, optional) — Y position (default: 0)\\n width (number, optional) — Width (default: 100)\\n height (number, optional) — Height (default: 100)\\n rotation (number, optional) — Rotation in degrees (0-360)\\n opacity (string, optional) — Opacity (0-1) or variable name\\n visible (boolean, optional) — Show/hide (default true)\\n locked (boolean, optional) — Lock/unlock (default false)\\n blendMode (PASS_THROUGH | NORMAL | DARKEN | MULTIPLY | LINEAR_BURN | COLOR_BURN | LIGHTEN | SCREEN | LINEAR_DODGE | COLOR_DODGE | OVERLAY | SOFT_LIGHT | HARD_LIGHT | DIFFERENCE | EXCLUSION | HUE | SATURATION | COLOR | LUMINOSITY, optional)\\n layoutPositioning (AUTO | ABSOLUTE, optional) — ABSOLUTE = floating inside auto-layout parent\\n fills (array, optional) — Fill paints array — e.g. [{type: 'SOLID', color: '#hex'}] or [] for transparent. Primary way to set fills.\\n fillColor (Color, optional) — Shorthand — sets a single solid fill (auto-binds to matching variable/style)\\n fillStyleName (string, optional) — Paint style name for fill\\n fillVariableName (string, optional) — Color variable by name e.g. 'bg/primary'\\n strokes (array, optional) — Stroke paints array — e.g. [{type: 'SOLID', color: '#hex'}] or [] to clear. Primary way to set strokes.\\n strokeColor (Color, optional) — Shorthand — sets a single solid stroke (auto-binds to matching variable/style)\\n strokeStyleName (string, optional) — Paint style name for stroke\\n strokeVariableName (string, optional) — Color variable by name for stroke\\n strokeWeight (string, optional) — All sides (number) or variable name (string). Per-side: strokeTopWeight, strokeBottomWeight, strokeLeftWeight, strokeRightWeight.\\n strokeTopWeight (string, optional)\\n strokeBottomWeight (string, optional)\\n strokeLeftWeight (string, optional)\\n strokeRightWeight (string, optional)\\n strokeAlign (INSIDE | OUTSIDE | CENTER, optional) — Stroke position (default: INSIDE)\\n strokesIncludedInLayout (boolean, optional) — Include stroke width in layout measurements (default: false)\\n cornerRadius (string, optional) — All corners (number) or variable name (string). Per-corner: topLeftRadius, topRightRadius, bottomRightRadius, bottomLeftRadius.\\n topLeftRadius (string, optional)\\n topRightRadius (string, optional)\\n bottomRightRadius (string, optional)\\n bottomLeftRadius (string, optional)\\n effectStyleName (string, optional) — Effect style name (e.g. 'Shadow/Card') for shadows, blurs\\n layoutMode (HORIZONTAL | VERTICAL, required) — Primary axis direction\\n layoutWrap (NO_WRAP | WRAP, optional)\\n padding (string, optional) — All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft.\\n paddingTop (string, optional)\\n paddingRight (string, optional)\\n paddingBottom (string, optional)\\n paddingLeft (string, optional)\\n primaryAxisAlignItems (MIN | MAX | CENTER | SPACE_BETWEEN, optional)\\n counterAxisAlignItems (MIN | MAX | CENTER | BASELINE, optional)\\n layoutSizingHorizontal (FIXED | HUG | FILL, optional)\\n layoutSizingVertical (FIXED | HUG | FILL, optional)\\n itemSpacing (string, optional) — Spacing between children (number or variable name string, default: 0)\\n counterAxisSpacing (string, optional) — Gap between wrapped rows (requires layoutWrap: WRAP)\\n minWidth (number, optional) — Min width for responsive auto-layout\\n maxWidth (number, optional) — Max width for responsive auto-layout\\n minHeight (number, optional) — Min height for responsive auto-layout\\n maxHeight (number, optional) — Max height for responsive auto-layout\\n overflowDirection (NONE | HORIZONTAL | VERTICAL | BOTH, optional) — Scroll overflow in prototype (default: NONE)\\n clipsContent (boolean, optional)\\n nodeIds (string[], optional) — Existing node IDs to wrap into auto-layout\\n\\n ## section — Figma section (top-level organizer)\\n name (string, required) — Section name\\n parentId (string, optional) — Parent node ID. Omit to place on current page.\\n x (number, optional) — X position (default: 0)\\n y (number, optional) — Y position (default: 0)\\n width (number, optional) — Width (default: 500)\\n height (number, optional) — Height (default: 500)\\n fills (array, optional) — Fill paints array — e.g. [{type: 'SOLID', color: '#hex'}] or [] for transparent\\n fillColor (Color, optional) — Shorthand — sets a single solid fill (auto-binds to matching variable/style)\\n fillStyleName (string, optional) — Paint style name for fill\\n fillVariableName (string, optional) — Color variable by name e.g. 'bg/primary'\\n\\n ## rectangle — Rectangle shape node\\n name (string, optional) — Layer name (default: 'Rectangle')\\n parentId (string, optional) — Parent node ID. Omit to place on current page.\\n x (number, optional) — X position (default: 0)\\n y (number, optional) — Y position (default: 0)\\n width (number, optional) — Width in px (default: 100)\\n height (number, optional) — Height in px (default: 100)\\n fills (array, optional) — Fill paints array — e.g. [{type: 'SOLID', color: '#hex'}] or [] for transparent\\n fillColor (Color, optional) — Shorthand — sets a single solid fill (auto-binds to matching variable/style)\\n fillStyleName (string, optional) — Paint style name for fill\\n fillVariableName (string, optional) — Color variable by name e.g. 'bg/primary'\\n strokes (array, optional) — Stroke paints array — e.g. [{type: 'SOLID', color: '#hex'}] or [] to clear\\n strokeColor (Color, optional) — Shorthand — sets a single solid stroke (auto-binds to matching variable/style)\\n strokeVariableName (string, optional) — Color variable by name for stroke\\n strokeWeight (string, optional)\\n cornerRadius (string, optional) — All corners (number) or variable name (string). Per-corner: topLeftRadius, topRightRadius, bottomRightRadius, bottomLeftRadius.\\n topLeftRadius (string, optional)\\n topRightRadius (string, optional)\\n bottomRightRadius (string, optional)\\n bottomLeftRadius (string, optional)\\n opacity (string, optional)\\n layoutSizingHorizontal (FIXED | FILL, optional) — Horizontal sizing in auto-layout parent\\n layoutSizingVertical (FIXED | FILL, optional) — Vertical sizing in auto-layout parent\\n\\n ## ellipse — Ellipse/circle shape node\\n name (string, optional) — Layer name (default: 'Ellipse')\\n parentId (string, optional) — Parent node ID. Omit to place on current page.\\n x (number, optional) — X position (default: 0)\\n y (number, optional) — Y position (default: 0)\\n width (number, optional) — Width in px (default: 100)\\n height (number, optional) — Height in px (default: 100, same as width for circle)\\n fills (array, optional) — Fill paints array — e.g. [{type: 'SOLID', color: '#hex'}] or [] for transparent\\n fillColor (Color, optional) — Shorthand — sets a single solid fill (auto-binds to matching variable/style)\\n fillStyleName (string, optional) — Paint style name for fill\\n fillVariableName (string, optional) — Color variable by name e.g. 'bg/primary'\\n strokes (array, optional) — Stroke paints array — e.g. [{type: 'SOLID', color: '#hex'}] or [] to clear\\n strokeColor (Color, optional) — Shorthand — sets a single solid stroke (auto-binds to matching variable/style)\\n strokeVariableName (string, optional) — Color variable by name for stroke\\n strokeWeight (string, optional)\\n opacity (string, optional)\\n layoutSizingHorizontal (FIXED | FILL, optional) — Horizontal sizing in auto-layout parent\\n layoutSizingVertical (FIXED | FILL, optional) — Vertical sizing in auto-layout parent\\n\\n ## line — Line shape node\\n name (string, optional) — Layer name (default: 'Line')\\n parentId (string, optional) — Parent node ID. Omit to place on current page.\\n x (number, optional) — X position (default: 0)\\n y (number, optional) — Y position (default: 0)\\n length (number, optional) — Line length in px (default: 100)\\n rotation (number, optional) — Rotation in degrees (default: 0 = horizontal)\\n strokes (array, optional) — Stroke paints array — e.g. [{type: 'SOLID', color: '#hex'}] or [] to clear\\n strokeColor (Color, optional) — Line color (default: black, auto-binds to matching variable/style)\\n strokeVariableName (string, optional) — Color variable by name for stroke\\n strokeWeight (string, optional) — Line thickness (default: 1)\\n opacity (string, optional)\\n layoutSizingHorizontal (FIXED | FILL, optional) — Horizontal sizing in auto-layout parent (defaults to FILL in vertical auto-layout)\\n\\n ## group — Group existing nodes together\\n nodeIds (string[], required) — Node IDs to group (min 1)\\n name (string, optional) — Group name\\n parentId (string, optional) — Parent node ID. Omit to place on current page.\\n\\n ## boolean_operation — Combine shapes with boolean operations (union, subtract, intersect, exclude)\\n operation (UNION | SUBTRACT | INTERSECT | EXCLUDE, required) — Boolean operation type\\n nodeIds (string[], required) — Node IDs to combine (min 2, first node is the base for SUBTRACT)\\n name (string, optional) — Result node name\\n parentId (string, optional) — Parent node ID. Omit to place on current page.\\n\\n ## svg — Create node from SVG markup\\n svg (string, required) — SVG markup string\\n name (string, optional) — Layer name (default: 'SVG')\\n parentId (string, optional) — Parent node ID. Omit to place on current page.\\n x (number, optional) — X position (default: 0)\\n y (number, optional) — Y position (default: 0)\\n fillStyleName (string, optional) — Paint style to apply to vector fills\\n fillVariableName (string, optional) — Color variable by name for vector fills\\n strokeStyleName (string, optional) — Paint style to apply to vector strokes\\n strokeVariableName (string, optional) — Color variable by name for vector strokes\",\n \"export\": \"# frames.export\\nExport a node as PNG, JPG, SVG, SVG_STRING, or PDF\\n\\nParams:\\n id (string, required) — Node ID to export\\n format (PNG | JPG | SVG | SVG_STRING | PDF, optional) — Export format (default: PNG). SVG_STRING returns raw SVG text.\\n scale (number, optional) — Export scale (default: 1, only for PNG/JPG)\"\n }\n },\n \"instances\": {\n \"summary\": \"# instances\\nCreate and manage component instances.\\n\\nMethods:\\n list Search for nodes (returns stubs only — use get with depth for full properties) [read]\\n delete Delete nodes [edit]\\n clone Duplicate nodes [create]\\n audit Run lint on a node — returns severity-ranked findings [read]\\n reparent Move nodes into a new parent [edit]\\n get Get instance detail with component properties and overrides [read]\\n create Create component instances [create]\\n update Set instance properties [edit]\\n swap Swap instance component (preserves overrides) [edit]\\n detach Detach instances from their component (converts to frame) [edit]\\n reset_overrides Reset all overrides on instances to match their main component [edit]\\n\\n// depth: omit → id+name stubs | 0 → props + child stubs | N → recurse N | -1 → full tree\\n// fields: whitelist e.g. [\\\"fills\\\",\\\"opacity\\\"] — id, name, type always included. Pass [\\\"*\\\"] for all.\\n// layoutSizingHorizontal/Vertical: FIXED | HUG | FILL — how the node sizes within auto-layout.\\n// Colors: fillVariableName/strokeVariableName bind by name — preferred over raw color values.\\n// Note: node-based endpoints (frames, text, instances, components) use `results` as the list key.\\n// Standalone endpoints (styles, variables, variable_collections) use `items`. Components.list uses `items` (catalog view).\\n// ---\\n// visible: false hides the node. Omitted from response when true (the default).\\n// locked: true prevents editing in Figma UI. Omitted when false (the default).\\n// rotation: degrees (0-360). Omitted when 0.\\n// blendMode: layer blend mode. Omitted when PASS_THROUGH (the default).\\n// layoutPositioning: ABSOLUTE = floating inside auto-layout parent. Omitted when AUTO (the default).\\n// minWidth/maxWidth/minHeight/maxHeight: responsive constraints for auto-layout children.\\n// constraints: position behavior in non-auto-layout parents. Ignored inside auto-layout frames.\\n// bindings: bind design variables to node properties. field uses slash path: \\\"fills/0/color\\\" (first fill), \\\"strokes/0/color\\\", \\\"opacity\\\", \\\"width\\\", \\\"height\\\", \\\"cornerRadius\\\", \\\"paddingLeft\\\", \\\"itemSpacing\\\".\\n// explicitMode: pin a variable mode on this node. Use { collectionName, modeName } (preferred) or { collectionId, modeId }.\\n// properties: escape hatch — set any Figma node property directly. Use only when no dedicated field exists.\\ninterface Node {\\n id: string; name: string; type: string;\\n visible?: boolean; // omitted when true\\n locked?: boolean; // omitted when false\\n opacity?: number; // omitted when 1\\n rotation?: number; // omitted when 0\\n blendMode?: string; // omitted when PASS_THROUGH\\n layoutPositioning?: \\\"AUTO\\\" | \\\"ABSOLUTE\\\";\\n layoutSizingHorizontal?: \\\"FIXED\\\" | \\\"HUG\\\" | \\\"FILL\\\";\\n layoutSizingVertical?: \\\"FIXED\\\" | \\\"HUG\\\" | \\\"FILL\\\";\\n minWidth?: number; maxWidth?: number; minHeight?: number; maxHeight?: number;\\n absoluteBoundingBox: { x: number; y: number; width: number; height: number };\\n fills?: Paint[]; // solid: {type: \\\"SOLID\\\", color: {r, g, b, a}}\\n strokes?: Paint[];\\n effects?: Effect[]; // DROP_SHADOW | INNER_SHADOW | LAYER_BLUR | BACKGROUND_BLUR\\n children?: NodeStub[]; // stubs: {id, name, type} — use depth to expand\\n}\\n// PatchItem uses flat params matching create shape — no nested sub-objects.\\n// Fill/stroke/corner/layout/text params are identical to frames.create and text.create.\\n// Unknown keys produce a warning, preventing silent failures.\\n// Instances are linked copies of components. Changes to the component propagate to all instances.\\n// Overrides: instance-level changes (text, fills, visibility) that differ from the component. Shown in overrides array.\\n// variantProperties: when creating from a component set, pick which variant e.g. {\\\"Style\\\":\\\"Secondary\\\",\\\"Size\\\":\\\"Large\\\"}.\\n// ---\\n// Property keys: read returns clean names (\\\"Label\\\"), write requires the #suffix (\\\"Label#1:0\\\"). Call instances.get(id) to discover exact keys before update.\\n// swap: change which component an instance points to while preserving compatible overrides.\\n// detach: permanently converts an instance to a regular frame, breaking the component link.\\n// reset_overrides: reverts all instance overrides to match the main component.\\n// Workflow: components.list → instances.create with componentId + properties (one call). No separate update needed for text/boolean overrides.\\n// Instances support frame-level overrides: layoutSizingHorizontal/Vertical (FIXED, FILL, HUG), opacity, width/height, min/max.\\n// Use layoutSizingHorizontal: \\\"FILL\\\" to make instances stretch in auto-layout parents.\\n\\nUse instances(method: \\\"help\\\", topic: \\\"<method>\\\") for method details.\",\n \"methods\": {\n \"list\": \"# instances.list\\nSearch for nodes (returns stubs only — use get with depth for full properties)\\n\\nParams:\\n query (string, optional) — Name search query (case-insensitive substring match)\\n types (string[], optional) — Filter by node types (e.g. [\\\"FRAME\\\", \\\"TEXT\\\"])\\n parentId (string, optional) — Search only within this subtree\\n fields (string[], optional) — Property whitelist. Identity fields (id, name, type) always included. Omit for stubs on list, full on get. Pass [\\\"*\\\"] for all.\\n offset (number, optional) — Skip N items for pagination (default 0)\\n limit (number, optional) — Max items per page (default 100)\",\n \"delete\": \"# instances.delete\\nDelete nodes\\n\\nParams:\\n id (string, optional) — Single node ID\\n items (array, optional) — Batch: [{id}, ...]\\n id (string, optional)\",\n \"clone\": \"# instances.clone\\nDuplicate nodes\\n\\nParams:\\n id (string, required) — Node ID\\n parentId (string, optional) — Parent node ID. Omit to place on current page.\\n x (number, optional) — X position (default: 0)\\n y (number, optional) — Y position (default: 0)\\n depth (number, optional) — Response detail: omit for id+name only. 0=properties + child stubs. N=recurse N levels. -1=unlimited.\",\n \"audit\": \"# instances.audit\\nRun lint on a node — returns severity-ranked findings\\n\\nParams:\\n id (string, required) — Node ID to audit\\n rules (string[], optional) — Rules to check. Default: [\\\"all\\\"]. Categories: \\\"component\\\", \\\"composition\\\", \\\"token\\\", \\\"naming\\\", \\\"wcag\\\".\\n maxDepth (number, optional) — Max tree depth (default: 10)\\n maxFindings (number, optional) — Max findings (default: 50)\",\n \"reparent\": \"# instances.reparent\\nMove nodes into a new parent\\n\\nParams:\\n items (array, required) — Array of {id, parentId, index?}\\n id (string, required)\\n parentId (string, required)\\n index (number, optional)\",\n \"get\": \"# instances.get\\nGet instance detail with component properties and overrides\\n\\nParams:\\n id (string, required) — Instance node ID\\n fields (string[], optional) — Property whitelist. Identity fields (id, name, type) always included. Omit for stubs on list, full on get. Pass [\\\"*\\\"] for all.\\n depth (number, optional) — Response detail: omit for id+name only. 0=properties + child stubs. N=recurse N levels. -1=unlimited.\\n verbose (boolean, optional) — Include all properties (bounding box, constraints, text style details). Default false — returns slim, actionable output.\",\n \"create\": \"# instances.create\\nCreate component instances\\n\\nExample: instances(method:\\\"create\\\", items:[{componentId:\\\"1:23\\\", variantProperties:{\\\"Size\\\":\\\"Large\\\"}, properties:{\\\"Label\\\":\\\"Click me\\\"}, parentId:\\\"2:45\\\", layoutSizingHorizontal:\\\"FILL\\\"}])\\n\\nParams:\\n items (InstanceCreateItem[], required) — Array of {componentId, variantProperties?, x?, y?, parentId?, layoutSizingHorizontal?, ...}\\n opacity (string, optional) — Opacity (0-1) or variable name\\n visible (boolean, optional) — Show/hide (default true)\\n locked (boolean, optional) — Lock/unlock (default false)\\n blendMode (PASS_THROUGH | NORMAL | DARKEN | MULTIPLY | LINEAR_BURN | COLOR_BURN | LIGHTEN | SCREEN | LINEAR_DODGE | COLOR_DODGE | OVERLAY | SOFT_LIGHT | HARD_LIGHT | DIFFERENCE | EXCLUSION | HUE | SATURATION | COLOR | LUMINOSITY, optional)\\n effectStyleName (string, optional) — Effect style name (e.g. 'Shadow/Card') for shadows, blurs\\n layoutSizingHorizontal (FIXED | HUG | FILL, optional)\\n layoutSizingVertical (FIXED | HUG | FILL, optional)\\n layoutPositioning (AUTO | ABSOLUTE, optional) — ABSOLUTE = floating inside auto-layout parent\\n minWidth (number, optional) — Min width for responsive auto-layout\\n maxWidth (number, optional) — Max width for responsive auto-layout\\n minHeight (number, optional) — Min height for responsive auto-layout\\n maxHeight (number, optional) — Max height for responsive auto-layout\\n componentId (string, required) — Component or component set ID\\n variantProperties (object, optional) — Pick variant e.g. {\\\"Style\\\":\\\"Secondary\\\"}\\n properties (object, optional) — Set component properties inline e.g. {\\\"Label\\\":\\\"Click me\\\", \\\"ShowIcon\\\":true}. Same as instances.update properties.\\n name (string, optional) — Instance layer name\\n x (number, optional)\\n y (number, optional)\\n width (number, optional) — Override width (resize)\\n height (number, optional) — Override height (resize)\\n parentId (string, optional) — Parent node ID. Omit to place on current page.\\n depth (number, optional) — Response detail: omit for id+name only. 0=properties + child stubs. N=recurse N levels. -1=unlimited.\",\n \"update\": \"# instances.update\\nSet instance properties\\n\\nExample: instances(method:\\\"update\\\", items:[{id:\\\"1:23\\\", properties:{\\\"Label#4:0\\\":\\\"Submit\\\"}, fillColor:\\\"#3B82F6\\\", layoutSizingHorizontal:\\\"FILL\\\"}])\\n\\nParams:\\n items (InstanceUpdateItem[], required) — Array of {id, properties: {\\\"Label#1:0\\\":\\\"text\\\"}, fillColor?: ...}\\n fills (array, optional) — Fill paints array — e.g. [{type: 'SOLID', color: '#hex'}] or [] for transparent. Primary way to set fills.\\n fillColor (Color, optional) — Shorthand — sets a single solid fill (auto-binds to matching variable/style)\\n fillStyleName (string, optional) — Paint style name for fill\\n fillVariableName (string, optional) — Color variable by name e.g. 'bg/primary'\\n strokes (array, optional) — Stroke paints array — e.g. [{type: 'SOLID', color: '#hex'}] or [] to clear. Primary way to set strokes.\\n strokeColor (Color, optional) — Shorthand — sets a single solid stroke (auto-binds to matching variable/style)\\n strokeStyleName (string, optional) — Paint style name for stroke\\n strokeVariableName (string, optional) — Color variable by name for stroke\\n strokeWeight (string, optional) — All sides (number) or variable name (string). Per-side: strokeTopWeight, strokeBottomWeight, strokeLeftWeight, strokeRightWeight.\\n strokeTopWeight (string, optional)\\n strokeBottomWeight (string, optional)\\n strokeLeftWeight (string, optional)\\n strokeRightWeight (string, optional)\\n strokeAlign (INSIDE | OUTSIDE | CENTER, optional) — Stroke position (default: INSIDE)\\n strokesIncludedInLayout (boolean, optional) — Include stroke width in layout measurements (default: false)\\n cornerRadius (string, optional) — All corners (number) or variable name (string). Per-corner: topLeftRadius, topRightRadius, bottomRightRadius, bottomLeftRadius.\\n topLeftRadius (string, optional)\\n topRightRadius (string, optional)\\n bottomRightRadius (string, optional)\\n bottomLeftRadius (string, optional)\\n opacity (string, optional) — Opacity (0-1) or variable name\\n visible (boolean, optional) — Show/hide (default true)\\n locked (boolean, optional) — Lock/unlock (default false)\\n blendMode (PASS_THROUGH | NORMAL | DARKEN | MULTIPLY | LINEAR_BURN | COLOR_BURN | LIGHTEN | SCREEN | LINEAR_DODGE | COLOR_DODGE | OVERLAY | SOFT_LIGHT | HARD_LIGHT | DIFFERENCE | EXCLUSION | HUE | SATURATION | COLOR | LUMINOSITY, optional)\\n effectStyleName (string, optional) — Effect style name (e.g. 'Shadow/Card') for shadows, blurs\\n layoutMode (NONE | HORIZONTAL | VERTICAL, optional) — Layout direction (default: NONE)\\n layoutWrap (NO_WRAP | WRAP, optional)\\n padding (string, optional) — All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft.\\n paddingTop (string, optional)\\n paddingRight (string, optional)\\n paddingBottom (string, optional)\\n paddingLeft (string, optional)\\n primaryAxisAlignItems (MIN | MAX | CENTER | SPACE_BETWEEN, optional)\\n counterAxisAlignItems (MIN | MAX | CENTER | BASELINE, optional)\\n itemSpacing (string, optional) — Spacing between children (number or variable name string, default: 0)\\n counterAxisSpacing (string, optional) — Gap between wrapped rows (requires layoutWrap: WRAP)\\n layoutSizingHorizontal (FIXED | HUG | FILL, optional)\\n layoutSizingVertical (FIXED | HUG | FILL, optional)\\n layoutPositioning (AUTO | ABSOLUTE, optional) — ABSOLUTE = floating inside auto-layout parent\\n minWidth (number, optional) — Min width for responsive auto-layout\\n maxWidth (number, optional) — Max width for responsive auto-layout\\n minHeight (number, optional) — Min height for responsive auto-layout\\n maxHeight (number, optional) — Max height for responsive auto-layout\\n fontSize (number, optional) — Font size\\n fontFamily (string, optional) — Font family\\n fontStyle (string, optional) — Font variant e.g. \\\"Bold\\\", \\\"Italic\\\" — overrides fontWeight\\n fontWeight (number, optional) — 100-900. Ignored when fontStyle is set.\\n fontColor (Color, optional) — Shorthand — sets text color (auto-binds to matching variable/style)\\n fontColorVariableName (string, optional) — Bind color variable by name e.g. 'text/primary'\\n fontColorStyleName (string, optional) — Apply paint style — overrides fontColor\\n textStyleId (string, optional) — Apply text style by ID — overrides fontSize/fontWeight\\n textStyleName (string, optional) — Text style by name (case-insensitive)\\n textAlignHorizontal (LEFT | CENTER | RIGHT | JUSTIFIED, optional)\\n textAlignVertical (TOP | CENTER | BOTTOM, optional)\\n textAutoResize (NONE | WIDTH_AND_HEIGHT | HEIGHT | TRUNCATE, optional)\\n id (string, required) — Instance node ID\\n properties (object, optional) — Component property key→value map\\n componentProperties (object, optional) — Alias for properties (matches instances.get response shape)\\n name (string, optional) — Rename node\\n rotation (number, optional) — Degrees (0-360)\\n x (number, optional)\\n y (number, optional)\\n width (number, optional)\\n height (number, optional)\\n clearFill (boolean, optional) — Remove all fills\\n effects (array, optional) — Effect array (DROP_SHADOW, INNER_SHADOW, LAYER_BLUR, BACKGROUND_BLUR)\\n constraints (object, optional)\\n bindings (array, optional) — Bind variables to properties. field path examples: 'fills/0/color', 'strokes/0/color', 'opacity', 'width', 'cornerRadius', 'itemSpacing'.\\n field (string, required)\\n variableName (string, optional)\\n variableId (string, optional)\\n explicitMode (object, optional) — Pin variable mode — use { collectionName, modeName } (preferred) or { collectionId, modeId }\\n exportSettings (array, optional) — Export settings\",\n \"swap\": \"# instances.swap\\nSwap instance component (preserves overrides)\\n\\nParams:\\n items (array, required) — Array of {id, componentId}\\n id (string, required) — Instance node ID\\n componentId (string, required) — New component or component set ID\",\n \"detach\": \"# instances.detach\\nDetach instances from their component (converts to frame)\\n\\nParams:\\n items (array, required) — Array of {id}\\n id (string, required) — Instance node ID\",\n \"reset_overrides\": \"# instances.reset_overrides\\nReset all overrides on instances to match their main component\\n\\nParams:\\n items (array, required) — Array of {id}\\n id (string, required) — Instance node ID\"\n }\n },\n \"lint\": {\n \"summary\": \"# lint\\nRun design quality and accessibility checks.\\n\\nMethods:\\n check Run design linter on a node tree [read]\\n fix Auto-fix frames to auto-layout [edit]\\n\\n// Lint runs automated design quality and accessibility checks on a node tree.\\n// ---\\n// Rules: \\\"all\\\" (default), or filter by category or specific rule names.\\n// Category meta-rules (expand to all rules in that category):\\n// \\\"component\\\" — component property binding checks\\n// \\\"composition\\\" — layout and positioning checks\\n// \\\"token\\\" — design token / style usage checks\\n// \\\"naming\\\" — layer naming checks\\n// \\\"wcag\\\" / \\\"accessibility\\\" — all WCAG accessibility checks\\n// ---\\n// Severity levels (output is sorted by severity, highest first):\\n// \\\"error\\\" — definite bug, must fix\\n// \\\"unsafe\\\" — likely causes layout/accessibility problems\\n// \\\"heuristic\\\" — probably worth fixing, context-dependent\\n// \\\"style\\\" — opinionated, nice-to-have (leaf nodes, decorative elements often downgraded here)\\n// Context-aware: leaf nodes (text, shapes, small frames) are treated differently from containers.\\n// Small labels with HUG sizing, leaf nodes on cross-axis — downgraded to \\\"style\\\" instead of \\\"heuristic\\\".\\n// Per-finding severity overrides appear on individual nodes when context changes the default.\\n// ---\\n// Component rules [component]:\\n// \\\"no-text-property\\\" — component text not exposed as editable property [heuristic]\\n// \\\"component-bindings\\\" — unbound text, orphaned properties, unexposed nested text [heuristic; orphaned→unsafe, nested→style]\\n// Composition rules [composition]:\\n// \\\"no-autolayout\\\" — frames with manually positioned children [heuristic; leaf-only containers→style]\\n// \\\"overlapping-children\\\" — children stacked at same position [heuristic]\\n// \\\"shape-instead-of-frame\\\" — shapes used as containers [style]\\n// \\\"fixed-in-autolayout\\\" — FIXED-size children in auto-layout parents [heuristic]\\n// \\\"unbounded-hug\\\" — HUG on both axes [unsafe; short leaf text→style]\\n// \\\"hug-cross-axis\\\" — HUG on cross-axis of constrained parent [heuristic; leaf nodes→style]\\n// \\\"empty-container\\\" — empty frames [style]\\n// Token rules [token]:\\n// \\\"hardcoded-color\\\" — colors not using styles or variables [heuristic]\\n// \\\"hardcoded-token\\\" — numeric values not bound to FLOAT variable [heuristic]\\n// \\\"no-text-style\\\" — text without a text style [heuristic]\\n// Naming rules [naming]:\\n// \\\"default-name\\\" — default names like \\\"Frame 1\\\" [style]\\n// \\\"stale-text-name\\\" — text node name doesn't match content [style]\\n// Accessibility rules [wcag]:\\n// \\\"wcag-contrast\\\" — AA contrast ratio [unsafe]\\n// \\\"wcag-contrast-enhanced\\\" — AAA contrast ratio [style]\\n// \\\"wcag-non-text-contrast\\\" — non-text 3:1 contrast [heuristic]\\n// \\\"wcag-target-size\\\" — targets below 24x24px [unsafe]\\n// \\\"wcag-text-size\\\" — text below 12px [unsafe]\\n// \\\"wcag-line-height\\\" — line height below 1.5x [style]\\n// ---\\n// maxDepth limits how deep the tree traversal goes (default: 10). maxFindings caps total findings (default: 50).\\n// fix: auto-converts frames to auto-layout. Use after lint.check identifies \\\"no-autolayout\\\" issues.\\n\\nUse lint(method: \\\"help\\\", topic: \\\"<method>\\\") for method details.\",\n \"methods\": {\n \"check\": \"# lint.check\\nRun design linter on a node tree\\n\\nExample: lint(method:\\\"check\\\", nodeId:\\\"0:1\\\", rules:[\\\"wcag\\\",\\\"hardcoded-color\\\"])\\n\\nParams:\\n nodeId (string, optional) — Node ID to lint. If omitted: 1 selected node → lints that node, 2+ selected → lints entire page (not the selection), 0 selected → error. Always pass nodeId explicitly for reliable targeting.\\n rules (string[], optional) — Rules to run. Default: [\\\"all\\\"]. Categories: \\\"component\\\", \\\"composition\\\", \\\"token\\\", \\\"naming\\\", \\\"wcag\\\"/\\\"accessibility\\\". Or specific rule names.\\n maxDepth (number, optional) — Max tree depth (default: 10)\\n maxFindings (number, optional) — Max findings (default: 50)\",\n \"fix\": \"# lint.fix\\nAuto-fix frames to auto-layout\\n\\nParams:\\n items (array, required) — Array of {nodeId, layoutMode?, itemSpacing?}\\n nodeId (string, required) — Frame node ID\\n layoutMode (VERTICAL | HORIZONTAL, optional) — Direction (default: auto-detected)\\n itemSpacing (number, optional) — Spacing between children\\n depth (number, optional) — Response detail for fixed nodes: omit for stubs, 0=properties, -1=full tree\"\n }\n },\n \"prototyping\": {\n \"summary\": \"# prototyping\\nManage prototype interactions, reactions, and navigation flows.\\n\\nMethods:\\n get Get reactions and overflow direction on a node [read]\\n add Add a prototype reaction to a node [edit]\\n set Replace all reactions on a node (raw reactions array) [edit]\\n remove Remove a reaction from a node by index [edit]\\n\\n// Reactions wire up interactions: trigger (ON_CLICK, ON_HOVER, ...) → action (navigate, swap, overlay).\\n// Common patterns: button ON_CLICK → NAVIGATE to detail frame; card ON_HOVER → CHANGE_TO hover variant.\\n// Multi-action: pass actions[] array to run multiple actions on one trigger (e.g. navigate + set variable mode).\\n// ---\\n// TRIGGERS: ON_CLICK | ON_HOVER | ON_PRESS | ON_DRAG | AFTER_TIMEOUT(timeout) | MOUSE_ENTER(delay) | MOUSE_LEAVE(delay) | ON_KEY_DOWN(keyCodes)\\n// NAVIGATION: NAVIGATE (go to frame) | SWAP (swap overlay) | OVERLAY (show overlay) | SCROLL_TO | CHANGE_TO (swap component variant)\\n// TRANSITIONS: DISSOLVE | SMART_ANIMATE | MOVE_IN | MOVE_OUT | PUSH | SLIDE_IN | SLIDE_OUT (+ direction for directional)\\n// EASING: EASE_IN | EASE_OUT | EASE_IN_AND_OUT | LINEAR | GENTLE | QUICK | BOUNCY | SLOW\\n// ACTIONS: NODE (navigate/swap) | BACK (go back) | CLOSE (close overlay) | URL (open link) | SET_VARIABLE_MODE (switch theme/mode)\\n\\nUse prototyping(method: \\\"help\\\", topic: \\\"<method>\\\") for method details.\",\n \"methods\": {\n \"get\": \"# prototyping.get\\nGet reactions and overflow direction on a node\\n\\nParams:\\n id (string, required) — Node ID\",\n \"add\": \"# prototyping.add\\nAdd a prototype reaction to a node\\n\\nExample: prototyping(method:\\\"add\\\", id:\\\"btn-1\\\", trigger:\\\"ON_CLICK\\\", destination:\\\"detail-frame-id\\\", navigation:\\\"NAVIGATE\\\")\\n\\nParams:\\n id (string, required) — Node ID\\n trigger (ON_CLICK | ON_HOVER | ON_PRESS | ON_DRAG | AFTER_TIMEOUT | MOUSE_ENTER | MOUSE_LEAVE | ON_KEY_DOWN, required) — Trigger type\\n triggerDelay (number, optional) — Delay in ms for AFTER_TIMEOUT / MOUSE_ENTER / MOUSE_LEAVE triggers\\n triggerKeyCodes (number[], optional) — Key codes for ON_KEY_DOWN trigger\\n triggerDevice (KEYBOARD | XBOX_ONE | PS4 | SWITCH_PRO, optional) — Device for ON_KEY_DOWN (default: KEYBOARD)\\n destination (string, optional) — Target node ID (required for NODE actions)\\n navigation (NAVIGATE | SWAP | OVERLAY | SCROLL_TO | CHANGE_TO, optional) — Navigation type (default: NAVIGATE)\\n transition (DISSOLVE | SMART_ANIMATE | MOVE_IN | MOVE_OUT | PUSH | SLIDE_IN | SLIDE_OUT | INSTANT, optional) — Transition animation (default: DISSOLVE). INSTANT = no animation.\\n transitionDirection (LEFT | RIGHT | TOP | BOTTOM, optional) — Direction for MOVE_IN, MOVE_OUT, PUSH, SLIDE_IN, SLIDE_OUT\\n duration (number, optional) — Transition duration in seconds (default: 0.3)\\n easing (EASE_IN | EASE_OUT | EASE_IN_AND_OUT | LINEAR | GENTLE | QUICK | BOUNCY | SLOW, optional) — Easing function (default: EASE_OUT)\\n actionType (NODE | BACK | CLOSE | URL | SET_VARIABLE_MODE, optional) — Action type (default: NODE). SET_VARIABLE_MODE switches a variable collection mode.\\n url (string, optional) — URL for URL action type\\n collectionName (string, optional) — Variable collection name (for SET_VARIABLE_MODE)\\n modeName (string, optional) — Mode name to switch to (for SET_VARIABLE_MODE)\\n resetScrollPosition (boolean, optional) — Reset scroll position on navigate (default: true)\\n actions (array, optional) — Multi-action: [{actionType, destination?, navigation?, collectionName?, modeName?, ...}]. Overrides single-action params.\",\n \"set\": \"# prototyping.set\\nReplace all reactions on a node (raw reactions array)\\n\\nParams:\\n id (string, required) — Node ID\\n reactions (array, required) — Full reactions array — [{trigger:{type}, actions:[{type, destinationId, navigation, transition}]}]\",\n \"remove\": \"# prototyping.remove\\nRemove a reaction from a node by index\\n\\nParams:\\n id (string, required) — Node ID\\n index (number, required) — Reaction index (0-based)\"\n }\n },\n \"selection\": {\n \"summary\": \"# selection\\nRead and set the current Figma selection.\\n\\nMethods:\\n get Get the current selection [read]\\n set Set selection to nodes and scroll viewport to show them [read]\\n\\n// Selection is the set of nodes currently highlighted in the Figma canvas.\\n// get returns the current selection. Without depth, returns stubs ({id, name, type}). With depth=0, returns full properties.\\n// _truncated: true when the response was cut short due to node budget limits. Use depth=0 or specific fields to reduce payload.\\n// set replaces the entire selection AND scrolls the viewport to show the selected nodes.\\n\\nUse selection(method: \\\"help\\\", topic: \\\"<method>\\\") for method details.\",\n \"methods\": {\n \"get\": \"# selection.get\\nGet the current selection\\n\\nParams:\\n depth (number, optional) — Child recursion depth. Omit for stubs only, 0=selected nodes' properties, -1=unlimited.\\n verbose (boolean, optional) — Include all properties (bounding box, constraints, text style details). Default false — returns slim, actionable output.\",\n \"set\": \"# selection.set\\nSet selection to nodes and scroll viewport to show them\\n\\nParams:\\n nodeIds (string[], required) — Array of node IDs to select. Example: [\\\"1:2\\\",\\\"1:3\\\"]\"\n }\n },\n \"styles\": {\n \"summary\": \"# styles\\nCRUD for local paint, text, effect, and grid styles.\\n\\nMethods:\\n list List local styles with optional type filter [read]\\n get Get full style detail by ID [read]\\n create Create local styles [create]\\n update Update styles by ID or name [edit]\\n delete Delete styles [edit]\\n\\n// Styles are named, reusable design properties that can be applied to nodes. Four types:\\n// paint: a named color (applied to fills/strokes), text: typography settings, effect: shadows/blurs, grid: layout grids.\\n// All ID params accept both IDs and display names (case-insensitive). Use whichever you have.\\n// ---\\n// leadingTrim: \\\"CAP_HEIGHT\\\" trims line-height to cap height (tighter text boxes), \\\"NONE\\\" is default.\\n// fontStyle: font variant name like \\\"Bold\\\", \\\"Italic\\\", \\\"Bold Italic\\\". Use fonts.list to find available styles.\\n//\\n// Effect object shape (for effect styles):\\n// { type: \\\"DROP_SHADOW\\\"|\\\"INNER_SHADOW\\\"|\\\"LAYER_BLUR\\\"|\\\"BACKGROUND_BLUR\\\",\\n// color?: Color, offset?: {x, y}, radius: number, spread?: number,\\n// visible?: boolean, blendMode?: string }\\n// DROP_SHADOW/INNER_SHADOW require color, offset, radius. LAYER_BLUR/BACKGROUND_BLUR require radius only.\\n// Example: { type: \\\"DROP_SHADOW\\\", color: \\\"#00000040\\\", offset: {x:0,y:4}, radius: 8 }\\n//\\n// LayoutGrid object shape (for grid styles):\\n// Rows/Columns: { pattern: \\\"ROWS\\\"|\\\"COLUMNS\\\", alignment: \\\"MIN\\\"|\\\"MAX\\\"|\\\"STRETCH\\\"|\\\"CENTER\\\",\\n// gutterSize: number, count: number, sectionSize?: number, offset?: number, visible?: boolean, color?: Color }\\n// Grid: { pattern: \\\"GRID\\\", sectionSize: number, visible?: boolean, color?: Color }\\n// Example: { pattern: \\\"COLUMNS\\\", alignment: \\\"STRETCH\\\", gutterSize: 20, count: 12, offset: 40 }\\n\\nUse styles(method: \\\"help\\\", topic: \\\"<method>\\\") for method details.\",\n \"methods\": {\n \"list\": \"# styles.list\\nList local styles with optional type filter\\n\\nParams:\\n type (paint | text | effect | grid, optional) — Filter by style type\\n fields (string[], optional) — Property whitelist. Identity fields (id, name, type) always included. Omit for stubs on list, full on get. Pass [\\\"*\\\"] for all.\\n offset (number, optional) — Skip N items for pagination (default 0)\\n limit (number, optional) — Max items per page (default 100)\",\n \"get\": \"# styles.get\\nGet full style detail by ID\\n\\nParams:\\n id (string, required) — Style ID or name\\n fields (string[], optional) — Property whitelist. Identity fields (id, name, type) always included. Omit for stubs on list, full on get. Pass [\\\"*\\\"] for all.\",\n \"create\": \"# styles.create\\nCreate local styles\\n\\nExample: styles(method:\\\"create\\\", type:\\\"effect\\\", name:\\\"Shadow/Medium\\\", effects:[{type:\\\"DROP_SHADOW\\\", color:\\\"#00000040\\\", offset:{x:0,y:4}, radius:8}])\\n\\nDiscriminant: type (paint | text | effect | grid)\\n\\n ## paint — Paint/color style\\n name (string, required) — Style name\\n color (Color, required) — Color value\\n colorVariableName (string, optional) — Bind to a COLOR variable by name (style tracks the variable)\\n description (string, optional) — Style description\\n\\n ## text — Text style\\n name (string, required) — Style name\\n fontFamily (string, required) — Font family\\n fontStyle (string, optional) — Font style (default: Regular)\\n fontSize (number, required) — Font size\\n lineHeight (line_height, optional)\\n letterSpacing (letter_spacing, optional)\\n textCase (ORIGINAL | UPPER | LOWER | TITLE | SMALL_CAPS | SMALL_CAPS_FORCED, optional)\\n textDecoration (NONE | UNDERLINE | STRIKETHROUGH, optional)\\n paragraphIndent (number, optional) — Paragraph indent (px)\\n paragraphSpacing (number, optional) — Paragraph spacing (px)\\n leadingTrim (CAP_HEIGHT | NONE, optional) — Leading trim mode\\n description (string, optional) — Style description\\n\\n ## effect — Effect style\\n name (string, required) — Style name\\n effects (array, required) — Array of Effect objects\\n description (string, optional) — Style description\\n\\n ## grid — Grid/layout grid style\\n name (string, required) — Style name\\n layoutGrids (array, required) — Array of LayoutGrid objects\\n description (string, optional) — Style description\",\n \"update\": \"# styles.update\\nUpdate styles by ID or name\\n\\nExample: styles(method:\\\"update\\\", items:[{id:\\\"Surface/Primary\\\", color:\\\"#F5F5F5\\\"}])\\n\\nParams:\\n type (paint | text | effect | grid, optional) — Style type hint for strict validation (optional, auto-detected)\\n items (PatchStyleItem[], required) — Array of {id, ...fields} to update\\n id (string, required) — Style ID or name\\n name (string, optional) — Rename the style\\n description (string, optional) — Style description\\n color (Color, optional) — New color (paint styles)\\n colorVariableName (string, optional) — Bind to a COLOR variable by name (paint styles)\\n fontFamily (string, optional)\\n fontStyle (string, optional)\\n fontSize (number, optional)\\n lineHeight (line_height, optional)\\n letterSpacing (letter_spacing, optional)\\n textCase (ORIGINAL | UPPER | LOWER | TITLE | SMALL_CAPS | SMALL_CAPS_FORCED, optional)\\n textDecoration (NONE | UNDERLINE | STRIKETHROUGH, optional)\\n paragraphIndent (number, optional) — Paragraph indent (px)\\n paragraphSpacing (number, optional) — Paragraph spacing (px)\\n leadingTrim (CAP_HEIGHT | NONE, optional)\\n effects (array, optional) — Array of Effect objects\\n layoutGrids (array, optional) — Array of LayoutGrid objects (grid styles)\",\n \"delete\": \"# styles.delete\\nDelete styles\\n\\nParams:\\n id (string, optional) — Style ID or name\\n items (array, optional) — Batch: [{id}, ...]\\n id (string, required) — Style ID or name\"\n }\n },\n \"text\": {\n \"summary\": \"# text\\nCreate and manage text nodes.\\n\\nMethods:\\n get Get serialized node data [read]\\n list Search for nodes (returns stubs only — use get with depth for full properties) [read]\\n update Patch node properties [edit]\\n delete Delete nodes [edit]\\n clone Duplicate nodes [create]\\n audit Run lint on a node — returns severity-ranked findings [read]\\n reparent Move nodes into a new parent [edit]\\n create Create text nodes [create]\\n set_content Replace text content on existing text nodes [edit]\\n scan Scan all text nodes within a subtree [read]\\n\\n// depth: omit → id+name stubs | 0 → props + child stubs | N → recurse N | -1 → full tree\\n// fields: whitelist e.g. [\\\"fills\\\",\\\"opacity\\\"] — id, name, type always included. Pass [\\\"*\\\"] for all.\\n// layoutSizingHorizontal/Vertical: FIXED | HUG | FILL — how the node sizes within auto-layout.\\n// Colors: fillVariableName/strokeVariableName bind by name — preferred over raw color values.\\n// Note: node-based endpoints (frames, text, instances, components) use `results` as the list key.\\n// Standalone endpoints (styles, variables, variable_collections) use `items`. Components.list uses `items` (catalog view).\\n// ---\\n// visible: false hides the node. Omitted from response when true (the default).\\n// locked: true prevents editing in Figma UI. Omitted when false (the default).\\n// rotation: degrees (0-360). Omitted when 0.\\n// blendMode: layer blend mode. Omitted when PASS_THROUGH (the default).\\n// layoutPositioning: ABSOLUTE = floating inside auto-layout parent. Omitted when AUTO (the default).\\n// minWidth/maxWidth/minHeight/maxHeight: responsive constraints for auto-layout children.\\n// constraints: position behavior in non-auto-layout parents. Ignored inside auto-layout frames.\\n// bindings: bind design variables to node properties. field uses slash path: \\\"fills/0/color\\\" (first fill), \\\"strokes/0/color\\\", \\\"opacity\\\", \\\"width\\\", \\\"height\\\", \\\"cornerRadius\\\", \\\"paddingLeft\\\", \\\"itemSpacing\\\".\\n// explicitMode: pin a variable mode on this node. Use { collectionName, modeName } (preferred) or { collectionId, modeId }.\\n// properties: escape hatch — set any Figma node property directly. Use only when no dedicated field exists.\\ninterface Node {\\n id: string; name: string; type: string;\\n visible?: boolean; // omitted when true\\n locked?: boolean; // omitted when false\\n opacity?: number; // omitted when 1\\n rotation?: number; // omitted when 0\\n blendMode?: string; // omitted when PASS_THROUGH\\n layoutPositioning?: \\\"AUTO\\\" | \\\"ABSOLUTE\\\";\\n layoutSizingHorizontal?: \\\"FIXED\\\" | \\\"HUG\\\" | \\\"FILL\\\";\\n layoutSizingVertical?: \\\"FIXED\\\" | \\\"HUG\\\" | \\\"FILL\\\";\\n minWidth?: number; maxWidth?: number; minHeight?: number; maxHeight?: number;\\n absoluteBoundingBox: { x: number; y: number; width: number; height: number };\\n fills?: Paint[]; // solid: {type: \\\"SOLID\\\", color: {r, g, b, a}}\\n strokes?: Paint[];\\n effects?: Effect[]; // DROP_SHADOW | INNER_SHADOW | LAYER_BLUR | BACKGROUND_BLUR\\n children?: NodeStub[]; // stubs: {id, name, type} — use depth to expand\\n}\\n// PatchItem uses flat params matching create shape — no nested sub-objects.\\n// Fill/stroke/corner/layout/text params are identical to frames.create and text.create.\\n// Unknown keys produce a warning, preventing silent failures.\\n// Text nodes display text content with typography styling. They inherit node methods (get, list, update, delete, clone, reparent).\\n// textAutoResize: NONE (fixed box), WIDTH_AND_HEIGHT (grow both), HEIGHT (fixed width, auto height), TRUNCATE (fixed + ellipsis).\\n// Prefer textStyleName for typography, fontColorVariableName/fontColorStyleName for color.\\n// Aliases: fillColor → fontColor, fillVariableName → fontColorVariableName, fillStyleName → fontColorStyleName (consistent with frames API).\\n// ---\\n// Smart defaults inside auto-layout parent: layoutSizingHorizontal defaults to FILL, layoutSizingVertical to HUG, textAutoResize to HEIGHT.\\n// Text fills parent width and wraps automatically. Override with explicit values if needed.\\n// fontStyle vs fontWeight: fontStyle is a named variant like \\\"Bold\\\", \\\"Italic\\\", \\\"SemiBold\\\". When set, fontWeight is ignored.\\n// Use fonts.list to find available fontFamily + fontStyle combinations.\\n// scan: finds all text nodes in a subtree. path (when includePath:true) shows the layer hierarchy e.g. \\\"Frame > Card > Label\\\".\\n// ScanResult (per-item): { nodeId, count, truncated, textNodes: [{ id, name, characters, fontSize, fontFamily, fontStyle, path?, depth?, absoluteX?, absoluteY?, width?, height? }] }\\n\\nUse text(method: \\\"help\\\", topic: \\\"<method>\\\") for method details.\",\n \"methods\": {\n \"get\": \"# text.get\\nGet serialized node data\\n\\nParams:\\n id (string, required) — Node ID\\n fields (string[], optional) — Property whitelist. Identity fields (id, name, type) always included. Omit for stubs on list, full on get. Pass [\\\"*\\\"] for all.\\n depth (number, optional) — Response detail: omit for id+name only. 0=properties + child stubs. N=recurse N levels. -1=unlimited.\\n verbose (boolean, optional) — Include all properties (bounding box, constraints, text style details). Default false — returns slim, actionable output.\",\n \"list\": \"# text.list\\nSearch for nodes (returns stubs only — use get with depth for full properties)\\n\\nParams:\\n query (string, optional) — Name search query (case-insensitive substring match)\\n types (string[], optional) — Filter by node types (e.g. [\\\"FRAME\\\", \\\"TEXT\\\"])\\n parentId (string, optional) — Search only within this subtree\\n fields (string[], optional) — Property whitelist. Identity fields (id, name, type) always included. Omit for stubs on list, full on get. Pass [\\\"*\\\"] for all.\\n offset (number, optional) — Skip N items for pagination (default 0)\\n limit (number, optional) — Max items per page (default 100)\",\n \"update\": \"# text.update\\nPatch node properties\\n\\nParams:\\n items (PatchItem[], required) — Array of {id, ...properties} to patch\\n fills (array, optional) — Fill paints array — e.g. [{type: 'SOLID', color: '#hex'}] or [] for transparent. Primary way to set fills.\\n fillColor (Color, optional) — Shorthand — sets a single solid fill (auto-binds to matching variable/style)\\n fillStyleName (string, optional) — Paint style name for fill\\n fillVariableName (string, optional) — Color variable by name e.g. 'bg/primary'\\n strokes (array, optional) — Stroke paints array — e.g. [{type: 'SOLID', color: '#hex'}] or [] to clear. Primary way to set strokes.\\n strokeColor (Color, optional) — Shorthand — sets a single solid stroke (auto-binds to matching variable/style)\\n strokeStyleName (string, optional) — Paint style name for stroke\\n strokeVariableName (string, optional) — Color variable by name for stroke\\n strokeWeight (string, optional) — All sides (number) or variable name (string). Per-side: strokeTopWeight, strokeBottomWeight, strokeLeftWeight, strokeRightWeight.\\n strokeTopWeight (string, optional)\\n strokeBottomWeight (string, optional)\\n strokeLeftWeight (string, optional)\\n strokeRightWeight (string, optional)\\n strokeAlign (INSIDE | OUTSIDE | CENTER, optional) — Stroke position (default: INSIDE)\\n strokesIncludedInLayout (boolean, optional) — Include stroke width in layout measurements (default: false)\\n cornerRadius (string, optional) — All corners (number) or variable name (string). Per-corner: topLeftRadius, topRightRadius, bottomRightRadius, bottomLeftRadius.\\n topLeftRadius (string, optional)\\n topRightRadius (string, optional)\\n bottomRightRadius (string, optional)\\n bottomLeftRadius (string, optional)\\n opacity (string, optional) — Opacity (0-1) or variable name\\n visible (boolean, optional) — Show/hide (default true)\\n locked (boolean, optional) — Lock/unlock (default false)\\n blendMode (PASS_THROUGH | NORMAL | DARKEN | MULTIPLY | LINEAR_BURN | COLOR_BURN | LIGHTEN | SCREEN | LINEAR_DODGE | COLOR_DODGE | OVERLAY | SOFT_LIGHT | HARD_LIGHT | DIFFERENCE | EXCLUSION | HUE | SATURATION | COLOR | LUMINOSITY, optional)\\n effectStyleName (string, optional) — Effect style name (e.g. 'Shadow/Card') for shadows, blurs\\n layoutMode (NONE | HORIZONTAL | VERTICAL, optional) — Layout direction (default: NONE)\\n layoutWrap (NO_WRAP | WRAP, optional)\\n padding (string, optional) — All edges (number) or variable name (string). Per-edge: paddingTop, paddingRight, paddingBottom, paddingLeft.\\n paddingTop (string, optional)\\n paddingRight (string, optional)\\n paddingBottom (string, optional)\\n paddingLeft (string, optional)\\n primaryAxisAlignItems (MIN | MAX | CENTER | SPACE_BETWEEN, optional)\\n counterAxisAlignItems (MIN | MAX | CENTER | BASELINE, optional)\\n itemSpacing (string, optional) — Spacing between children (number or variable name string, default: 0)\\n counterAxisSpacing (string, optional) — Gap between wrapped rows (requires layoutWrap: WRAP)\\n layoutSizingHorizontal (FIXED | HUG | FILL, optional)\\n layoutSizingVertical (FIXED | HUG | FILL, optional)\\n layoutPositioning (AUTO | ABSOLUTE, optional) — ABSOLUTE = floating inside auto-layout parent\\n minWidth (number, optional) — Min width for responsive auto-layout\\n maxWidth (number, optional) — Max width for responsive auto-layout\\n minHeight (number, optional) — Min height for responsive auto-layout\\n maxHeight (number, optional) — Max height for responsive auto-layout\\n fontSize (number, optional) — Font size\\n fontFamily (string, optional) — Font family\\n fontStyle (string, optional) — Font variant e.g. \\\"Bold\\\", \\\"Italic\\\" — overrides fontWeight\\n fontWeight (number, optional) — 100-900. Ignored when fontStyle is set.\\n fontColor (Color, optional) — Shorthand — sets text color (auto-binds to matching variable/style)\\n fontColorVariableName (string, optional) — Bind color variable by name e.g. 'text/primary'\\n fontColorStyleName (string, optional) — Apply paint style — overrides fontColor\\n textStyleId (string, optional) — Apply text style by ID — overrides fontSize/fontWeight\\n textStyleName (string, optional) — Text style by name (case-insensitive)\\n textAlignHorizontal (LEFT | CENTER | RIGHT | JUSTIFIED, optional)\\n textAlignVertical (TOP | CENTER | BOTTOM, optional)\\n textAutoResize (NONE | WIDTH_AND_HEIGHT | HEIGHT | TRUNCATE, optional)\\n id (string, required)\\n name (string, optional) — Rename node\\n rotation (number, optional) — Degrees (0-360)\\n x (number, optional)\\n y (number, optional)\\n width (number, optional)\\n height (number, optional)\\n clearFill (boolean, optional) — Remove all fills\\n effects (array, optional) — Effect array (DROP_SHADOW, INNER_SHADOW, LAYER_BLUR, BACKGROUND_BLUR)\\n overflowDirection (NONE | HORIZONTAL | VERTICAL | BOTH, optional) — Scroll overflow in prototype (default: NONE)\\n constraints (object, optional)\\n bindings (array, optional) — Bind variables to properties. field path examples: 'fills/0/color', 'strokes/0/color', 'opacity', 'width', 'cornerRadius', 'itemSpacing'.\\n field (string, required)\\n variableName (string, optional)\\n variableId (string, optional)\\n explicitMode (object, optional) — Pin variable mode — use { collectionName, modeName } (preferred) or { collectionId, modeId }\\n exportSettings (array, optional) — Export settings\\n properties (object, optional) — Direct Figma API props (escape hatch)\",\n \"delete\": \"# text.delete\\nDelete nodes\\n\\nParams:\\n id (string, optional) — Single node ID\\n items (array, optional) — Batch: [{id}, ...]\\n id (string, optional)\",\n \"clone\": \"# text.clone\\nDuplicate nodes\\n\\nParams:\\n id (string, required) — Node ID\\n parentId (string, optional) — Parent node ID. Omit to place on current page.\\n x (number, optional) — X position (default: 0)\\n y (number, optional) — Y position (default: 0)\\n depth (number, optional) — Response detail: omit for id+name only. 0=properties + child stubs. N=recurse N levels. -1=unlimited.\",\n \"audit\": \"# text.audit\\nRun lint on a node — returns severity-ranked findings\\n\\nParams:\\n id (string, required) — Node ID to audit\\n rules (string[], optional) — Rules to check. Default: [\\\"all\\\"]. Categories: \\\"component\\\", \\\"composition\\\", \\\"token\\\", \\\"naming\\\", \\\"wcag\\\".\\n maxDepth (number, optional) — Max tree depth (default: 10)\\n maxFindings (number, optional) — Max findings (default: 50)\",\n \"reparent\": \"# text.reparent\\nMove nodes into a new parent\\n\\nParams:\\n items (array, required) — Array of {id, parentId, index?}\\n id (string, required)\\n parentId (string, required)\\n index (number, optional)\",\n \"create\": \"# text.create\\nCreate text nodes\\n\\nExample: text(method:\\\"create\\\", items:[{text:\\\"Hello\\\", fontFamily:\\\"Inter\\\", fontSize:16, textStyleName:\\\"body/medium\\\"}])\\n\\nParams:\\n items (TextItem[], required) — Array of text items to create\\n text (string, optional) — Text content\\n name (string, optional) — Layer name\\n x (number, optional)\\n y (number, optional)\\n width (number, optional) — Fixed width in px — implies layoutSizingHorizontal: FIXED and textAutoResize: HEIGHT\\n parentId (string, optional) — Parent node ID. Omit to place on current page.\\n fontFamily (string, optional) — Font family (default: Inter). Use fonts.list to find installed fonts.\\n fontStyle (string, optional) — Font variant e.g. \\\"Bold\\\", \\\"Italic\\\" — overrides fontWeight\\n fontSize (number, optional) — Font size (default: 14)\\n fontWeight (number, optional) — 100-900 (default: 400). Ignored when fontStyle is set.\\n fills (array, optional) — Text color paints — e.g. [{type: 'SOLID', color: '#hex'}]. Same as node fills.\\n fontColor (Color, optional) — Shorthand — sets text color (auto-binds to matching variable/style)\\n fontColorVariableName (string, optional) — Bind color variable by name e.g. 'text/primary'\\n fontColorStyleName (string, optional) — Apply paint style — overrides fontColor\\n textStyleId (string, optional) — Text style ID or name (case-insensitive) — overrides fontSize/fontWeight\\n textStyleName (string, optional) — Alias for textStyleId — accepts name (case-insensitive)\\n textAlignHorizontal (LEFT | CENTER | RIGHT | JUSTIFIED, optional)\\n textAlignVertical (TOP | CENTER | BOTTOM, optional)\\n layoutSizingHorizontal (FIXED | HUG | FILL, optional)\\n layoutSizingVertical (FIXED | HUG | FILL, optional)\\n textAutoResize (NONE | WIDTH_AND_HEIGHT | HEIGHT | TRUNCATE, optional) — NONE (fixed box), WIDTH_AND_HEIGHT (grow both), HEIGHT (fixed width, auto height), TRUNCATE (fixed + ellipsis)\\n componentPropertyName (string, optional) — Bind to a component TEXT property by name. Walks up ancestors to find the nearest component, or targets the component specified by componentId. For deeply nested text, consider using components(method:'create', type:'from_node') with exposeText:true instead — it auto-discovers and binds all text nodes.\\n componentId (string, optional) — Target component ID for componentPropertyName binding. When omitted, walks up ancestors to find the nearest COMPONENT or COMPONENT_SET.\\n depth (number, optional) — Response detail: omit for id+name only. 0=properties + child stubs. N=recurse N levels. -1=unlimited.\",\n \"set_content\": \"# text.set_content\\nReplace text content on existing text nodes\\n\\nParams:\\n items (array, required) — Array of {nodeId, text}\\n nodeId (string, required) — Text node ID\\n text (string, required) — New text content\\n depth (number, optional) — Response detail: omit for id+name only. 0=properties + child stubs. N=recurse N levels. -1=unlimited.\",\n \"scan\": \"# text.scan\\nScan all text nodes within a subtree\\n\\nParams:\\n items ({ nodeId: string; limit?: number; includePath?: boolean; includeGeometry?: boolean }[], required) — Array of subtrees to scan\"\n }\n },\n \"variable_collections\": {\n \"summary\": \"# variable_collections\\nCRUD for variable collections — the document-level API for design tokens.\\n\\nMethods:\\n list List variable collections [read]\\n get Get collection with all variables and values (full document) [read]\\n create Create a collection with modes and variables in one call [create]\\n update Rename collections [edit]\\n delete Delete collections [edit]\\n add_mode Add a mode to a collection [create]\\n rename_mode Rename a mode [edit]\\n remove_mode Remove a mode from a collection [edit]\\n\\n// Variable collections group design tokens and define their modes (e.g. Light/Dark, Desktop/Mobile).\\n// All ID params accept both IDs and display names.\\n// ---\\n// valuesByMode: values keyed by mode name, e.g. {\\\"Light\\\": \\\"#FFF\\\", \\\"Dark\\\": \\\"#111\\\"}.\\n// Aliases: {type: \\\"VARIABLE_ALIAS\\\", name: \\\"other/variable\\\"}.\\n// scopes: see variables endpoint for full list.\\n// Deleting a collection deletes all variables inside it.\\n// The default mode cannot be removed. Use add_mode/remove_mode for additional modes.\\n\\nUse variable_collections(method: \\\"help\\\", topic: \\\"<method>\\\") for method details.\",\n \"methods\": {\n \"list\": \"# variable_collections.list\\nList variable collections\\n\\nParams:\\n fields (string[], optional) — Property whitelist. Identity fields (id, name, type) always included. Omit for stubs on list, full on get. Pass [\\\"*\\\"] for all.\\n offset (number, optional) — Skip N items for pagination (default 0)\\n limit (number, optional) — Max items per page (default 100)\",\n \"get\": \"# variable_collections.get\\nGet collection with all variables and values (full document)\\n\\nParams:\\n id (string, required) — Collection ID or name\\n fields (string[], optional) — Property whitelist. Identity fields (id, name, type) always included. Omit for stubs on list, full on get. Pass [\\\"*\\\"] for all.\",\n \"create\": \"# variable_collections.create\\nCreate a collection with modes and variables in one call\\n\\nExample: variable_collections(method:\\\"create\\\", items:[{name:\\\"Tokens\\\", modes:[\\\"Light\\\",\\\"Dark\\\"], variables:[{name:\\\"bg/primary\\\", type:\\\"COLOR\\\", valuesByMode:{\\\"Light\\\":\\\"#FFF\\\",\\\"Dark\\\":\\\"#111\\\"}, scopes:[\\\"ALL_FILLS\\\"]}, {name:\\\"text/primary\\\", type:\\\"COLOR\\\", valuesByMode:{\\\"Light\\\":\\\"#111\\\",\\\"Dark\\\":\\\"#F0F0F0\\\"}, scopes:[\\\"TEXT_FILL\\\"]}, {name:\\\"space/16\\\", type:\\\"FLOAT\\\", value:16, scopes:[\\\"GAP\\\",\\\"WIDTH_HEIGHT\\\"]}, {name:\\\"radius/8\\\", type:\\\"FLOAT\\\", value:8, scopes:[\\\"CORNER_RADIUS\\\"]}]}])\\n\\nParams:\\n items (array, required) — Array of collection documents\\n name (string, required) — Collection name\\n modes (string[], optional) — Mode names (e.g. ['Light', 'Dark']). Omit for single-mode collection.\\n variables (array, optional) — Variables to create inside this collection\\n name (string, required) — Variable name (unique within collection)\\n type (COLOR | FLOAT | STRING | BOOLEAN, required) — Variable type\\n value (variable_value, optional) — Shorthand — sets the default mode value. Use valuesByMode for multi-mode.\\n valuesByMode (object, optional) — Values keyed by mode name (e.g. {\\\"Light\\\": \\\"#FFF\\\", \\\"Dark\\\": \\\"#111\\\"})\\n description (string, optional)\\n scopes (string[], optional) — Restrict where variable can be applied (default: ALL_SCOPES)\",\n \"update\": \"# variable_collections.update\\nRename collections\\n\\nParams:\\n items (array, required) — Array of {id, name}\\n id (string, required) — Collection ID or name\\n name (string, required) — New name\",\n \"delete\": \"# variable_collections.delete\\nDelete collections\\n\\nParams:\\n id (string, optional) — Collection ID or name\\n items (array, optional) — Batch: [{id}, ...]\\n id (string, required)\",\n \"add_mode\": \"# variable_collections.add_mode\\nAdd a mode to a collection\\n\\nParams:\\n items (array, required) — Array of {collectionId, name}\\n collectionId (string, required) — Collection ID or name\\n name (string, required) — Mode name\",\n \"rename_mode\": \"# variable_collections.rename_mode\\nRename a mode\\n\\nParams:\\n items (array, required) — Array of {collectionId, modeId, name}\\n collectionId (string, required) — Collection ID or name\\n modeId (string, required) — Mode ID or name (e.g. \\\"Dark\\\")\\n name (string, required) — New name\",\n \"remove_mode\": \"# variable_collections.remove_mode\\nRemove a mode from a collection\\n\\nParams:\\n items (array, required) — Array of {collectionId, modeId}\\n collectionId (string, required) — Collection ID or name\\n modeId (string, required) — Mode ID or name (e.g. \\\"Dark\\\")\"\n }\n },\n \"variables\": {\n \"summary\": \"# variables\\nSearch and update design variables within a collection.\\n\\nMethods:\\n list Search variables within a collection [read]\\n get Get variable detail by name [read]\\n create Create variables in a collection. Use valuesByMode for multi-mode, or value for default mode only. [create]\\n update Update variable metadata and/or set values [edit]\\n delete Delete variables [edit]\\n\\n// Search and update variables within a collection. collectionId is required on all methods.\\n// Use variable_collections to create full token sets (collection + modes + variables in one call).\\n// ---\\n// query: prefix match first, then substring. \\\"bg/\\\" matches bg/canvas, bg/surface, etc.\\n// valuesByMode: values keyed by mode name. value is shorthand for the default mode.\\n// Aliases: {type: \\\"VARIABLE_ALIAS\\\", name: \\\"other/variable\\\"}.\\n// scopes: ALL_SCOPES, TEXT_CONTENT, WIDTH_HEIGHT, GAP, CORNER_RADIUS, ALL_FILLS, FRAME_FILL, SHAPE_FILL,\\n// TEXT_FILL, STROKE_COLOR, STROKE_FLOAT, EFFECT_FLOAT, EFFECT_COLOR, OPACITY, FONT_FAMILY, FONT_STYLE,\\n// FONT_WEIGHT, FONT_SIZE, LINE_HEIGHT, LETTER_SPACING, PARAGRAPH_SPACING, PARAGRAPH_INDENT\\n\\nUse variables(method: \\\"help\\\", topic: \\\"<method>\\\") for method details.\",\n \"methods\": {\n \"list\": \"# variables.list\\nSearch variables within a collection\\n\\nExample: variables(method:\\\"list\\\", collectionId:\\\"Colors\\\", query:\\\"bg/\\\")\\n\\nParams:\\n collectionId (string, required) — Collection ID or name\\n query (string, optional) — Search query — prefix match first, then substring fallback\\n type (COLOR | FLOAT | STRING | BOOLEAN, optional) — Filter by variable type\\n fields (string[], optional) — Property whitelist. Identity fields (id, name, type) always included. Omit for stubs on list, full on get. Pass [\\\"*\\\"] for all.\\n offset (number, optional) — Skip N items for pagination (default 0)\\n limit (number, optional) — Max items per page (default 100)\",\n \"get\": \"# variables.get\\nGet variable detail by name\\n\\nParams:\\n name (string, required) — Variable name (unique within collection)\\n collectionId (string, required) — Collection ID or name\\n fields (string[], optional) — Property whitelist. Identity fields (id, name, type) always included. Omit for stubs on list, full on get. Pass [\\\"*\\\"] for all.\",\n \"create\": \"# variables.create\\nCreate variables in a collection. Use valuesByMode for multi-mode, or value for default mode only.\\n\\nExample: variables(method:\\\"create\\\", collectionId:\\\"Colors\\\", items:[{name:\\\"bg/primary\\\", type:\\\"COLOR\\\", valuesByMode:{\\\"Light\\\":\\\"#FFF\\\",\\\"Dark\\\":\\\"#111\\\"}, scopes:[\\\"ALL_FILLS\\\"]}])\\n\\nParams:\\n collectionId (string, required) — Collection ID or name\\n items (VariableCreateItem[], required) — Array of variables to create\\n name (string, required) — Variable name (must be unique within collection)\\n type (COLOR | FLOAT | STRING | BOOLEAN, required) — Variable type\\n value (variable_value, optional) — Shorthand — sets the default mode value. Use valuesByMode for multi-mode.\\n valuesByMode (object, optional) — Values keyed by mode name (e.g. {\\\"Light\\\": \\\"#FFF\\\", \\\"Dark\\\": \\\"#111\\\"}). Takes precedence over value.\\n description (string, optional) — Variable description\\n scopes (string[], optional) — Restrict where variable can be applied (default: ALL_SCOPES)\",\n \"update\": \"# variables.update\\nUpdate variable metadata and/or set values\\n\\nExample: variables(method:\\\"update\\\", collectionId:\\\"Colors\\\", items:[{name:\\\"bg/primary\\\", valuesByMode:{\\\"Light\\\":\\\"#FFF\\\",\\\"Dark\\\":\\\"#222\\\"}}])\\n\\nParams:\\n collectionId (string, required) — Collection ID or name\\n items (VariableUpdateItem[], required) — Array of variable updates\\n name (string, required) — Variable name\\n rename (string, optional) — Rename the variable\\n description (string, optional) — Set description\\n scopes (string[], optional) — Update scopes\\n value (variable_value, optional) — Shorthand — sets the default mode value. Use valuesByMode for multi-mode.\\n valuesByMode (object, optional) — Values keyed by mode name. Takes precedence over value.\",\n \"delete\": \"# variables.delete\\nDelete variables\\n\\nParams:\\n collectionId (string, required) — Collection ID or name\\n name (string, optional) — Variable name\\n items (array, optional) — Batch: [{name}, ...]\\n name (string, required)\"\n }\n },\n \"version_history\": {\n \"summary\": \"# version_history\\nSave named versions to the Figma file's version history.\\n\\nMethods:\\n save Save a named version to the file's version history [edit]\\n\\n// Version history lets you create named snapshots of a Figma file.\\n// Use this after completing design tasks to create an audit trail of changes.\\n// Equivalent to Figma's File → Save to Version History (Cmd+Opt+S).\\n\\nUse version_history(method: \\\"help\\\", topic: \\\"<method>\\\") for method details.\",\n \"methods\": {\n \"save\": \"# version_history.save\\nSave a named version to the file's version history\\n\\nParams:\\n title (string, required) — Version title (e.g., \\\"Added hero sections with website copy\\\")\\n description (string, optional) — Optional longer description of what changed\"\n }\n }\n};\n\nexport const helpTopics: Record<string, string> = {\n \"missing_tools\": \"# Missing Create / Edit Tools\\n\\nIf the user asks you to create or modify something in Figma but you cannot find create/edit methods on endpoint tools, the MCP server was started without the correct access tier flag.\\n\\nVibma filters available methods at startup based on CLI flags passed in the MCP config `args` array:\\n\\n| Flag | Methods available |\\n|------|-----------------|\\n| _(none)_ | Read-only (get, list, check, scan, export) |\\n| `--create` | Read + creation methods (create, clone) |\\n| `--edit` | All methods (read + create + update + delete) |\\n\\nAsk the user to add `--edit` (or `--create`) to their MCP config args:\\n\\n```json\\n{\\n \\\"mcpServers\\\": {\\n \\\"Vibma\\\": {\\n \\\"command\\\": \\\"npx\\\",\\n \\\"args\\\": [\\\"-y\\\", \\\"@ufira/vibma\\\", \\\"--edit\\\"]\\n }\\n }\\n}\\n```\\n\\nAfter updating, the user must restart their AI tool or reload MCP servers — stdio-based servers cannot hot-reload.\"\n};\n\nconst allEndpointNames = Object.keys(helpEndpoints);\nconst allTopicNames = Object.keys(helpTopics);\n\n/** Resolve a help query. Returns help text. Always includes available options on error. */\nexport function resolveHelp(topic?: string): string {\n if (!topic) return helpDirectory;\n const dot = topic.indexOf(\".\");\n if (dot === -1) {\n const ep = helpEndpoints[topic];\n if (ep) return ep.summary;\n const t = helpTopics[topic];\n if (t) return t;\n const all = [...allEndpointNames, ...allTopicNames];\n return \"Unknown topic: \" + topic + \". Available: \" + all.join(\", \");\n }\n const epName = topic.slice(0, dot);\n const methodName = topic.slice(dot + 1);\n const ep = helpEndpoints[epName];\n if (!ep) {\n const all = [...allEndpointNames, ...allTopicNames];\n return \"Unknown topic: \" + epName + \". Available: \" + all.join(\", \");\n }\n const method = ep.methods[methodName];\n if (method) return method;\n return \"Unknown method: \" + methodName + \" on \" + epName + \". Available methods: \" + Object.keys(ep.methods).join(\", \");\n}\n\n/** Resolve a per-endpoint help query (for method=\"help\" on an endpoint). */\nexport function resolveEndpointHelp(endpoint: string, topic?: string): string | null {\n const ep = helpEndpoints[endpoint];\n if (!ep) return null;\n if (!topic) return ep.summary;\n const method = ep.methods[topic];\n if (method) return method;\n return \"Unknown method: \" + topic + \". Available methods on \" + endpoint + \": \" + Object.keys(ep.methods).join(\", \");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAyB;;;AC+CzB,IAAM,qBAAqB;AAGpB,SAAS,QAAQ,MAAe;AACrC,QAAM,OAAO,KAAK,UAAU,IAAI;AAChC,MAAI,KAAK,UAAU,oBAAoB;AACrC,WAAO,EAAE,SAAS,CAAC,EAAE,MAAM,QAAiB,KAAK,CAAC,EAAE;AAAA,EACtD;AACA,SAAO;AAAA,IACL,SAAS,CAAC;AAAA,MACR,MAAM;AAAA,MACN,MAAM,KAAK,UAAU;AAAA,QACnB,QAAQ;AAAA,QACR,SAAS,KAAK,MAAM,KAAK,SAAS,IAAI;AAAA,QACtC,SAAS;AAAA,MACX,CAAC;AAAA,IACH,CAAC;AAAA,EACH;AACF;AAGO,SAAS,SAAS,QAAgB,OAAgB;AACvD,QAAM,MAAM,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AACjE,SAAO,EAAE,SAAS,CAAC,EAAE,MAAM,QAAiB,MAAM,GAAG,MAAM,KAAK,GAAG,GAAG,CAAC,EAAE;AAC3E;;;ACrEO,IAAM,gBAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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