Skip to main content
Glama

read_my_design

Extract detailed node information from Figma designs to understand and analyze the current selection, enabling programmatic design automation.

Instructions

Get detailed information about the current selection in Figma, including all node details

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": {}, "type": "object" }

Implementation Reference

  • This server.tool() call registers the MCP tool 'read_my_design'. It defines an empty input schema ({}), a description, and an inline async handler function that forwards the 'read_my_design' command to the connected Figma plugin server via sendCommandToFigma(), then returns the result as JSON-formatted text content or an error message.
    server.tool( "read_my_design", "Get detailed information about the current selection in Figma, including all node details", {}, async () => { try { const result = await sendCommandToFigma("read_my_design", {}); return { content: [ { type: "text", text: JSON.stringify(result) } ] }; } catch (error) { return { content: [ { type: "text", text: `Error getting node info: ${error instanceof Error ? error.message : String(error) }`, }, ], }; } } );
  • The handler function for the 'read_my_design' tool. It sends the 'read_my_design' command with empty parameters to the Figma plugin using sendCommandToFigma(), stringifies the result as text content for the MCP response, and handles errors by returning an error message.
    async () => { try { const result = await sendCommandToFigma("read_my_design", {}); return { content: [ { type: "text", text: JSON.stringify(result) } ] }; } catch (error) { return { content: [ { type: "text", text: `Error getting node info: ${error instanceof Error ? error.message : String(error) }`, }, ], }; } }
  • The input schema for the 'read_my_design' tool, defined as an empty object ({}), indicating the tool takes no parameters.
    {},

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