Read selection
get_selectionRetrieves the nodes currently selected in Figma, including their subtree up to a configurable depth, so AI agents can inspect selected layers and details without manual lookup.
Instructions
Nodes currently selected by the user in Figma, with their subtree up to depth.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_selection"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | Levels of children to include | |
| detail | No | "outline" = id/name/type/children only (cheap, for exploring); "full" = geometry, fills, layout, text, components | full |
| maxNodes | No |