If Figma MCP is available — ALWAYS delegate to a subagent:
Figma responses are unpredictable in size. A section node can return thousands of lines of metadata; each get_design_context call returns full React component code + screenshots. Making these calls in the main conversation burns irreplaceable context on raw data that will be distilled down to a few key observations.
Rule: NEVER call Figma MCP tools directly in the main conversation. Always launch a subagent.
How to delegate
Launch a single generalPurpose Task subagent with a prompt that includes:
a) The Figma URL(s) and how to parse them:
fileKey = segment after /design/ (e.g., vvDPZ5v3PppO3ekMXiq2Xv)
nodeId = node-id query param value, with - replaced by : (e.g., 2173-19802 → 2173:19802)
- For
/design/:fileKey/branch/:branchKey/:fileName URLs, use branchKey as fileKey
b) The output format you determined in Step 1 (or ask the subagent to determine it from the screenshots).
c) The save path for the output file (following the naming conventions in Step 5).
d) The full instructions for what the subagent must do — copy the relevant template from templates.md into the subagent prompt so it has everything it needs.
e) The Figma fetching strategy (include this verbatim in the subagent prompt):
FIGMA FETCHING STRATEGY — follow this order:
1. FIRST: Call get_screenshot on the provided nodeId to get a visual overview.
This is cheap and gives you the full picture.
2. ASSESS the screenshot:
- If it shows a single screen or component → call get_design_context on that
same nodeId. You're done fetching.
- If it shows a SECTION with multiple screens (a grid/canvas of screens) →
you received a section node. Do NOT call get_design_context on the section
(it returns thousands of lines of sparse metadata). Instead:
a) Use the screenshot to identify the unique screen types (ignore
variations that differ only in geo/location/error states unless the
user specifically asked for those).
b) Call get_design_context on ONLY 2-3 representative child nodes that
capture the distinct screen types. Pick nodes that look unique in the
screenshot.
c) For variations (geo on/off, error states), describe them from the
section screenshot — do NOT fetch each variation individually.
3. LIMIT: Maximum 4 Figma API calls total per URL. If you need more, use the
screenshots you already have and describe the remaining screens from visual
inspection.
4. DISCARD CODE: The get_design_context tool returns React+Tailwind code.
Extract ONLY: (a) text content / labels / copy, (b) component names,
(c) interaction annotations (data-interaction-annotations),
(d) content annotations (data-content-annotations), (e) design tokens
(colors, fonts). Do NOT include the raw code in your output document.
5. SAVE the output document to the specified path. Return a brief summary
(max 20 lines) of what was found: screen count, key observations, critical
gaps, and the file path.
f) Any user-provided context about the design (e.g., "geo variations don't change the experience", "this is the checkout flow", "focus on the mobile screens").
What the subagent returns
The subagent saves the full document to the workspace and returns a brief summary (screen count, key observations, critical gaps, file path). The main conversation receives only this summary — all Figma API responses, metadata, and code stay in the subagent's context and are discarded.
Multiple Figma URLs
If the user provides multiple Figma URLs, launch one subagent per URL (in parallel if independent) or a single subagent if they are related screens that should be documented together. Each subagent follows the same strategy above.