Skip to main content
Question

Figma MCP + Claude Unable to Replace Slot Contents

  • May 15, 2026
  • 8 replies
  • 108 views

drewcovi_usb

Seems that with Figma’s MCP integration with Claude (via VSCode Chat) It is struggling to replace contents dynamically. is this a known limitation given the newness of slots?

 

Actually, I'm realizing the real constraint in Figma's component model depends on whether the component uses defined component properties or slot-based children. For slot components, I need to navigate the instance tree correctly to modify the slot frame's children, but the approach differs based on how the component is structured.

Looking at how the DetailsPage component is set up, it has named frames like "Heading", "Content", and "Aside" that act as slots, each with default content that gets replaced when properties are passed in. This means within an instance, I should be able to modify what's inside those slot frames by targeting them correctly.

The key insight is that I don't need to detach the instance to customize it. Instead, I can create the instance and then navigate into its internal structure to either hide the default content and add new frames, or swap out nested instances within those slots while keeping the parent instance intact.

But there's a limitation I'm running into—in the Figma plugin API, I can't actually add arbitrary new frames to an instance's internal frames since those children are read-only overrides. What I can do is modify text, change properties, swap nested component instances, and toggle visibility.

So I need to pivot away from the component instance approach entirely and instead treat the DetailsPage component as a frame reference to work from.

 

 

8 replies

adamsmasher
Figmate
  • Figmate
  • May 16, 2026

Hey, ​@drewcovi_usb!

 

Thanks for detailing your experience. Is that quote something that Claude gave you? Has the alternative approach it gave you worked out for you in the meantime? 

 

Regarding Slots and our MCP, this is helpful feedback that our team can use to refine Slots while it’s in open Beta ahead of GA. While I don’t have any specific updates right now, keep an eye out on our Release Notes page for more information on Slots and other features. Let me know if you have any other questions!


drewcovi_usb
  • Author
  • New Participant
  • May 18, 2026

thanks ​@adamsmasher ! ill stay tuned.


drewcovi_usb
  • Author
  • New Participant
  • May 18, 2026

the alternative approach really did not work :) i was pretty explicit about it not breaking the component and so it just put three instances on the screen seemingly unmodified.


d_greg
  • New Participant
  • May 19, 2026

Yes, API for MCPs still lacks of some features. Slots it’s still in Beta so that won’t be there for some time. However that would be a great improvement to let e.g. Claude setting up Slots.


d_greg
  • New Participant
  • May 19, 2026

My workaround is to ask Claude to put a pink placeholder for me and then I convert it into a Slot. Not the best but it works


Mamoon_Tayih
  • New Member
  • July 13, 2026

Still hitting this after Slots reached GA (June 10 release), so it doesn't look fully resolved.

instance.setProperties() correctly throws cannotSetSlotProperty on the slot key — expected.

Accessing the slot directly as a node (node.type === "SLOT") and removing its default children one by one: the first .remove() works, the second throws Node with id "..." not found. Same result removing forward or backward through the list.

@adamsmasher  — you mentioned this was useful feedback pre-GA. Wanted to confirm it's still happening now that Slots are out of Beta.


djv
Figmate
  • Community Support
  • July 13, 2026

HI ​@Mamoon_Tayih, thanks for chiming in here! 
 

To confirm: yes, this is still an open gap. We've seen the same friction reported internally even before Slots hit GA on June 10. The MCP/Plugin API side hasn't fully caught up with removing slot children programmatically, which lines up with the Node with id "..." not found error you're hitting after the first removal. A couple of questions so we can dig in further:

  1. Are you removing children directly via the Plugin API/use_figma, or through a specific Claude skill/prompt flow?
  2. Does the error happen on every slot instance, or only ones with a certain number/type of default children?

In the meantime, a temporary solution a few others in this thread have had luck with: instead of removing slot children directly, have Claude insert a placeholder frame, then swap/convert that manually. Not ideal, but it avoids the removal bug entirely.


With your additional context, we can flag this to the team to make sure it's still being tracked as a known issue. 


Mamoon_Tayih
  • New Member
  • July 16, 2026

Thanks ​@djv 

Got a working fix, tested cleanly in a real component just now — not just the placeholder-frame idea, something more specific.

Answers to your two questions:

  1. Direct Plugin API via use_figma, raw JavaScript — no skill or prompt template involved.
  2. Only tested one configuration: a slot with 3 default component-instance children. Forward and backward removal both failed the same way. Haven't varied count or content type (plain frames vs. instances), so I can't speak to whether this is instance-specific.

What actually works: the root cause isn't Slots specifically, and it isn't really about deletion either. Any structural mutation to a slot's contents — removing or appending — seems to invalidate references to the other default children that existed before that mutation, even ones re-read from .children moments earlier in the same script. Cross that boundary within one script execution and you get Node with id "..." not found. The fix is to never do both in the same call:

  1. Call 1: append new content into the slot. Don't touch the old default children at all in this call.
  2. Call 2 (separate execution): re-fetch the instance fresh (getNodeByIdAsync, not a held reference), identify the old defaults by their properties, and set visible = false on them — not .remove().

Tested this on a component with a 3-instance default slot, appending 2 and 4 new rows into two separate instances. Both worked cleanly, correct auto-layout height, defaults hidden and excluded from layout sizing. Screenshot-verified.

So the practical rule: split any slot mutation and any read/write on pre-existing slot content into separate script executions. Doing both in one call is what breaks it.