Skip to main content
Glama

get_selection

Retrieve details about currently selected elements in Figma to enable automated design workflows through natural language commands.

Instructions

Get information about the current selection in Figma

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registration of the MCP tool 'get_selection' with inline handler function. The handler proxies the request to the Figma plugin by calling sendCommandToFigma('get_selection'), formats the result as text content, and handles errors.
    server.tool( "get_selection", "Get information about the current selection in Figma", {}, async () => { try { const result = await sendCommandToFigma("get_selection"); return { content: [ { type: "text", text: JSON.stringify(result) } ] }; } catch (error) { return { content: [ { type: "text", text: `Error getting selection: ${error instanceof Error ? error.message : String(error) }`, }, ], }; } } );

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/andreycretsu/cursor-talk-to-figma-mcp-main'

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