Skip to content

Code Connect nested slots not resolved — second-level slot content lost #389

@sixdjango

Description

@sixdjango
npx figma -V     
1.4.2

get_design_context: Code Connect nested slots not resolved — second-level slot content lost

Description

When get_design_context processes components with nested Code Connect slots (a component with a slot containing another component that also has slots), the second-level slots are not resolved. This affects both Local MCP and Remote MCP modes differently.

Environment

  • Figma MCP Server (Local plugin + Remote MCP)
  • Code Connect: a React component library with List and List.Item components
  • Component hierarchy: List (slot: list-item-slot) → List.Item (slots: label-slot, prefix-slot, description-slot, extra-slot)

Issue 1: Local MCP — First-level slot not resolved, children dropped

Node: (redacted)

The List component is recognized, but its list-item-slot is not resolved at all. All List.Item children are silently dropped:

<List>{/* Code Connect Slot 'list-item-slot' */}</List>

The design contains multiple List.Item instances with real content — none of it appears in the output.


Issue 2: Remote MCP — First-level slot resolved, second-level slots not resolved

Node: (redacted)

The Remote MCP correctly resolves the first-level slot — List.Item is recognized and placed inside List. However, the second-level slots on List.Item (label-slot, prefix-slot, description-slot) are not resolved — they remain as empty comment placeholders:

<List>
  {/* Code Connect Slot 'list-item-slot' — resolved to List.Item ✅ */}
  <List.Item
    label={{/* Code Connect Slot 'label-slot' */}}       // ❌ not resolved
    prefix={{/* Code Connect Slot 'prefix-slot' */}}      // ❌ not resolved
    title={{/* Code Connect Slot 'description-slot' */}}  // ❌ not resolved
    divider="full"
    arrow
    extraCenter={true}
  />
</List>

The actual text content (merchant names, descriptions, etc.) visible in the Figma design is not extracted into label-slot, prefix-slot, or description-slot.

Expected output:

<List>
  <List.Item
    label="Merchant Name"
    prefix={<Avatar src="..." />}
    title="Monthly subscription"
    divider="full"
    arrow
    extraCenter={true}
  />
</List>

Comparison

Aspect Local MCP Remote MCP
List (1st-level component) Recognized Recognized
list-item-slot (1st-level slot) Not resolved — children dropped Resolved — List.Item placed inside List
List.Item (2nd-level component) Missing from output Recognized via Code Connect
label-slot / prefix-slot etc. (2nd-level slots) N/A Not resolved — empty comment placeholders

Root Cause Hypothesis

The slot resolution only works one level deep:

  • Local MCP stops at level 0: the first-level slot (list-item-slot) emits a comment placeholder but does not traverse the Figma subtree to discover child component instances
  • Remote MCP reaches level 1: the first-level slot is resolved and List.Item is matched, but its own slots are not traversed to extract the actual design content — resolution stops here

Impact

Most real-world component libraries use nested slot composition (e.g., ListList.Item, FormForm.Item, TableTable.Column). The current behavior makes get_design_context output incomplete for these common patterns — AI agents generate components with empty props, requiring manual content reconstruction.

Reproduction Steps

  1. Set up Code Connect for List with list-item-slot and List.Item with label-slot, description-slot
  2. In Figma, create a List instance containing List.Item instances with filled-in text
  3. Call get_design_context on the parent frame

Local MCP: <List>{/* empty */}</List>List.Item not discovered
Remote MCP: <List><List.Item label={/* empty */} /></List> — second-level slots unresolved

Your support case has been created! For reference, your case number is 1843302. Please keep an eye out for further correspondence from your support specialist in your email inbox!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions