get_node_info
Retrieve detailed data about a specific node in Figma, enabling AI-assisted design analysis and natural language interactions for streamlined workflows.
Instructions
Get detailed information about a specific node in Figma
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The complete implementation of the 'get_node_info' MCP tool, registered via server.tool(). The handler proxies the request to the Figma plugin using sendCommandToFigma, applies filterFigmaNode to the result, and returns formatted text content with error handling. Includes inline input schema using Zod."get_node_info", "Get detailed information about a specific node in Figma", { nodeId: z.string().describe("The ID of the node to get information about"), }, async ({ nodeId }) => { try { const result = await sendCommandToFigma("get_node_info", { nodeId }); return { content: [ { type: "text", text: JSON.stringify(filterFigmaNode(result)) } ] }; } catch (error) { return { content: [ { type: "text", text: `Error getting node info: ${error instanceof Error ? error.message : String(error)}`, }, ], }; } } );
- Input schema for get_node_info tool: requires a nodeId string.{ nodeId: z.string().describe("The ID of the node to get information about"), },
- src/talk_to_figma_mcp/tools/document-tools.ts:71-98 (registration)Registration of the get_node_info tool on the MCP server using server.tool() call."get_node_info", "Get detailed information about a specific node in Figma", { nodeId: z.string().describe("The ID of the node to get information about"), }, async ({ nodeId }) => { try { const result = await sendCommandToFigma("get_node_info", { nodeId }); return { content: [ { type: "text", text: JSON.stringify(filterFigmaNode(result)) } ] }; } catch (error) { return { content: [ { type: "text", text: `Error getting node info: ${error instanceof Error ? error.message : String(error)}`, }, ], }; } } );
- The 'get_node_info' command is typed in FigmaCommand union type for the commands sent to Figma plugin.| "get_node_info"
- Higher-level registration call that includes the document-tools where get_node_info is defined.registerDocumentTools(server);