Skip to main content
Glama

get_selection

Retrieves selected Figma nodes with full property details including dimensions, layout, fills, and styles. Enables inspection and node ID extraction for screenshots or design analysis.

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 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

Behavior5/5

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

With no annotations provided, the description fully covers behavioral traits: returns empty array when nothing selected, throws error if no connection, details on return format. No contradictions.

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

Conciseness5/5

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

The description is front-loaded with the main purpose, includes prerequisites, return format, error behavior, and usage examples. Every sentence adds value, no fluff.

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?

Despite no output schema, the description provides a comprehensive return structure and covers prerequisites and errors. It is complete for a zero-parameter tool and integrates well with sibling tools.

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 input schema has no parameters. Baseline for 0 params is 4, and description adds no further param details.

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 tool fetches selected nodes with full properties. It distinguishes from siblings like capture_screenshot and analyze_design by specifying use cases, such as retrieving node IDs for these tools.

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

Usage Guidelines4/5

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

Provides clear prerequisites (bridge running, at least one selection) and return behavior (empty array if none). Mentions specific use cases and links to alternative tools, though does not explicitly state when not to use it.

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/memi'

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