ai.to.design is now free.No account needed.Install now →
Docs menu

MCP Tools

get_selected_node

Gets the currently selected Figma node as structured JSON data.

Returns the selected node's full hierarchy including CSS styles, text content, and layout properties. Use this after render_html to obtain node IDs for editing, or to inspect an existing design and extract its structure. Optionally returns design tokens such as colors, fonts, and sizes.

Parameters

NameTypeRequiredDescription
nodeIdstringOptionalOptional Figma node ID to export. Defaults to current selection.
formatstringOptionalOutput format. Default: "json" (structured data). Default: json.
includeTokensbooleanOptionalInclude extracted design tokens (colors, fonts, sizes)

Example prompt

Try asking: Show me the structure and node IDs of the frame I just rendered.

Tips

  • Call this immediately after render_html to get node IDs for editing.
  • Use includeTokens: true to extract the color palette and typography from an existing design.
  • The returned node IDs are required by update_text, update_style, remove_node, and other tools.