Skip to main content
Glama

get_selection

Retrieve detailed properties of selected Figma design elements to use their IDs in other tools, inspect layouts, or analyze variant properties.

Instructions

Get the nodes currently selected in Figma, with full property details.

Prerequisites: Requires Figma bridge running and plugin connected. The user must have selected at least one node in Figma. Returns an empty array if nothing is selected.

Returns on success: Array of node objects. Each node includes: { id: string (node ID usable in other tools), name: string, type: string (e.g. "FRAME", "COMPONENT", "TEXT", "RECTANGLE"), width: number, height: number, x: number, y: number, layoutMode?: "HORIZONTAL"|"VERTICAL"|"NONE", primaryAxisSizingMode?: string, counterAxisSizingMode?: string, paddingTop?: number, paddingRight?: number, paddingBottom?: number, paddingLeft?: number, itemSpacing?: number, fills?: array, strokes?: array, effects?: array, styles?: Record<string, string>, variantProperties?: Record<string, string> (only for component instances) }

Error behavior: Throws "Figma not connected" if no plugin is connected.

Use this tool: to retrieve node IDs for use in capture_screenshot, figma_execute, or analyze_design; to inspect layout properties of a selected component; or to read variant properties before writing a spec.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: the prerequisite conditions (Figma bridge and plugin), the requirement for user selection, the return format (array of node objects with detailed properties), error behavior ('Throws "Figma not connected" if no plugin is connected'), and what happens with no selection (returns empty array). It doesn't mention rate limits or authentication needs, but covers most critical operational aspects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (purpose, prerequisites, returns, error behavior, usage guidelines) and every sentence adds value. It could be slightly more concise by combining some sentences, but the information density is high with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a tool that interacts with external design software and returns detailed node data, the description provides complete context. It covers prerequisites, expected inputs (implicitly through user selection), detailed output structure, error conditions, and specific usage scenarios. With no output schema provided, the description appropriately documents the return format in detail.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the baseline would be 4. The description appropriately doesn't discuss parameters since none exist, maintaining focus on the tool's operation and output instead.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Get the nodes currently selected in Figma') and resource ('with full property details'), distinguishing it from siblings like get_page_tree (which retrieves entire page structure) or get_spec (which retrieves specifications). The verb 'Get' combined with the resource scope makes the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit guidance is provided on when to use this tool: 'to retrieve node IDs for use in capture_screenshot, figma_execute, or analyze_design; to inspect layout properties of a selected component; or to read variant properties before writing a spec.' It also specifies prerequisites ('Requires Figma bridge running and plugin connected. The user must have selected at least one node in Figma') and distinguishes it from alternatives by naming specific sibling tools for different purposes.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sarveshsea/m-moire'

If you have feedback or need assistance with the MCP directory API, please join our Discord server