Skip to main content
Glama

get_selection

Retrieve the currently selected nodes in Figma, including names, types, and IDs. Use this to identify which elements to modify.

Instructions

Get the user's currently selected nodes in Figma.

Returns node names, types, and IDs of selected elements. Call this when the user's intent involves modifying existing elements:

  • "change this button", "update the card", "fix the spacing"

  • References to "this", "the selected", "it"

Skip for fresh design requests ("design a login page", "create a dashboard") — a new canvas has no selection to read, so the call returns nothing and burns an iteration.

Examples: get_selection()

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Discloses that calling with no selection returns nothing and wastes a turn, which is key for an AI agent. Also describes return content (names, types, IDs). No annotations exist to contradict. Could mention error cases or behavior on multiple selections, but overall transparent.

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?

Concise with clear front-loading: purpose, then usage guidance, then example. No superfluous sentences; every part adds value.

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, description explains return values. Covers when to use and when not. With zero parameters and clear purpose, the description provides complete context for an agent to decide and invoke correctly.

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?

No parameters in schema, so baseline 4. Description adds no parameter info, which is acceptable as there are none to describe.

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 'Get the user's currently selected nodes in Figma', a specific verb and resource. It differentiates well from sibling tools by focusing on reading selection rather than modification or creation.

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?

Explicitly lists when to call (modifying existing elements, references to 'this', 'the selected', 'it') and when to skip (fresh design requests). Provides concrete examples of user intents and warns about burning iterations on empty canvases.

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/musepy/genable'

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