read_my_design
Retrieve detailed information about selected elements in Figma designs to analyze node properties and structure for development workflows.
Instructions
Get detailed information about the current selection in Figma, including all node details
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/talk_to_figma_mcp/server.ts:155-182 (handler)The handler function for the MCP 'read_my_design' tool. It sends a 'read_my_design' command to the connected Figma plugin via WebSocket using sendCommandToFigma and returns the result as JSON-formatted text content. This is the core execution logic for the tool.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) }`, }, ], }; } } );
- src/talk_to_figma_mcp/server.ts:155-182 (registration)The server.tool call registers the 'read_my_design' tool with the MCP server, including its name, description, empty input schema, and handler function.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 input schema for the 'read_my_design' tool, which is empty (no parameters required).{},