read_my_design
Retrieve comprehensive details about selected elements in Figma, including node information, to enhance design understanding and workflow integration.
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:159-181 (handler)The handler function for the 'read_my_design' tool. It sends a 'read_my_design' command to the Figma plugin via sendCommandToFigma and returns the JSON-stringified result as text content, or an error message if failed.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)Registration of the 'read_my_design' MCP tool using server.tool(). Defines the name, description, empty input schema ({}), and the 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) }`, }, ], }; } } );
- Input schema for 'read_my_design' tool: empty object {}, indicating no input parameters required.{},