Skip to main content
Question

get_design_context returns component set default variant instead of actual instance override for direct instances

  • March 17, 2026
  • 4 replies
  • 53 views

Mike McGranahan

Product area: Dev Mode API / MCP Server (get_design_context tool)

Severity: Medium — causes incorrect code generation that can silently introduce wrong components/props

Summary: The get_design_context tool fails to read variant property overrides on direct component instances, instead returning the component set's default variant values. Instance overrides (nested instances within other instances) read correctly. This results in generated code that omits variant props on some call sites, causing them to fall back to incorrect defaults.

Reproduction steps:

  1. Open Figma file with a table design containing repeated rows, where each row uses a component instance with a variant property overridden from the default.
  2. In our case: a TableCellFrontSpace component set has a Content variant with values Icon (default) and Space. All 7 table rows in the design have Content = Space set explicitly in the Figma UI.
  3. Call get_design_context on the parent frame containing the table (node 3637:41031 in file NvVUoic7stnFCQxXNGr2c9).

Expected result: All 7 rows should generate code passing content="Space" to TableCellFrontSpace.

Actual result:

  • Row 1 (direct instance, node ID 3637:42990 — no I prefix): the generated code omits the content prop entirely, falling back to the default "Icon". This causes an ApplicationIcon to render instead of empty space.
  • Rows 2–7 (instance overrides, node IDs with I prefix, e.g., I3637:44334;3637:42928): correctly generate content="Space".

Generated code showing the bug:

// Component definition — note the default value "Icon"
function TableCellFrontSpace({ content = "Icon", size = "Large" }) {
if (content === "Icon") return <ApplicationIcon ... />; // WRONG for row 1
if (content === "Space") return <div className="spacer" />;
...
}

// Row 1 — direct instance (3637:42990) — BUG: content prop missing
<TableCellFrontSpace className="..." />
// Falls back to content="Icon", renders ApplicationIcon incorrectly

// Row 2 — instance override (I3637:44334;3637:42928) — CORRECT
<TableCellFrontSpace className="..." content="Space" />


Key observation: The bug correlates with node ID format. Direct instances (plain numeric IDs like 3637:42990) are affected. Instance overrides (IDs prefixed with I, like I3637:44334;3637:42928) read correctly.

Verified in the Figma UI: Selecting node 3637:42990 in the Figma desktop app confirms Content = Space in the properties panel. The MCP output is wrong.

Reproducibility:

  • Confirmed with both the remote Figma MCP server (via Figma power/plugin) and the local Figma MCP server (connected to Figma desktop app). Both produce identical incorrect output, indicating the bug is in the shared API/code generation layer, not in a specific MCP server implementation.

Impact:

  • Silently generates incorrect code — no error or warning is emitted
  • Particularly dangerous for repeated patterns (tables, lists) where the first item renders differently from the rest
  • Developers trusting the MCP output will ship UI bugs without realizing the Figma design was read incorrectly

Workaround: When a component function has variant props with defaults and some call sites omit the prop while others pass an explicit value, cross-reference with get_screenshot or the Figma UI to verify. If most instances pass the same value but one doesn't, assume the outlier is a bug in the MCP output.

Possibly related: 

 

4 replies

Hiro.3
  • New Member
  • February 3, 2026

When an instance in Figma has overrides applied relative to its main component, calling Figma MCP’s `get_design_context` on a node that includes that instance returns the original (pre-override) values instead of the overridden values.

This issue occurs on both the remote server and the desktop server.

## Steps to reproduce
1. Call `get_design_context` on the following node:  
   https://www.figma.com/design/HeBW5AkVeFUZctWtGVzqcO/%E7%84%A1%E9%A1%8C?node-id=1-146&t=x56GnXwSrM029hMQ-0

## Expected result
The button label is **"Override"**.

## Actual result
The button label is **"Original"**.

## Note
When having an AI implement the design, we also provide screenshots obtained via `get_screenshot`, so the AI can still produce something close to the actual design even if overridden values can’t be retrieved. However, this can lead to small visual mismatches where details end up slightly off.


Zach Johnson
  • New Member
  • March 18, 2026

+1 to this, I’ve hit this issue and it’s very annoying. It's been present for a long time and really needs to be fixed.


ksn
Figmate
  • Community Support
  • March 25, 2026

Hey ​@Mike McGranahan ​@Zach Johnson - thank you for reporting. I’m going to file a bug ticket with our MCP team to look into this more.

I’m also going to merge the thread you linked​@Mike McGranahan as I also suspect it’s relevant. That way, we can keep everyone in one place. 

Will update when I learn more.


ksn
Figmate
  • Community Support
  • April 2, 2026

Hey both - I’ve connected with engineering, and they’re wondering if you’d be open to sharing view-only access to the files where you’re seeing this issue so they can test the MCP directly.

If that works for you, please share view-only access with support-share@figma.com and send me the file name or URL. I’ll pass it along to them.

 

EDIT (April 6, 2026) -- if you can share, please PM me the file name and/or the URL so I can make sure to keep your information private. Thank you!