Skip to main content
Glama

get_nodes_info

Retrieve detailed information about multiple Figma design nodes by providing their IDs, enabling AI tools to access and analyze design elements for enhanced collaboration.

Instructions

Get detailed information about multiple nodes in Figma

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeIdsYesArray of node IDs to get information about

Implementation Reference

  • The handler function that implements the core logic of the get_nodes_info tool. It takes an array of nodeIds, fetches information for each using sendCommandToFigma('get_node_info'), filters the results with filterFigmaNode, and returns a formatted text response with the JSON data or an error message.
    async ({ nodeIds }) => { try { const results = await Promise.all( nodeIds.map(async (nodeId) => { const result = await sendCommandToFigma('get_node_info', { nodeId }); return { nodeId, info: result }; }) ); return { content: [ { type: "text", text: JSON.stringify(results.map((result) => filterFigmaNode(result.info))) } ] }; } catch (error) { return { content: [ { type: "text", text: `Error getting nodes info: ${error instanceof Error ? error.message : String(error)}` } ] }; } } );
  • Zod input schema for the get_nodes_info tool, defining the required 'nodeIds' parameter as an array of strings.
    { nodeIds: z.array(z.string()).describe("Array of node IDs to get information about") },
  • Registration of the 'get_nodes_info' tool on the MCP server using server.tool(), including the tool name, description, input schema, and inline handler function.
    server.tool( "get_nodes_info", "Get detailed information about multiple nodes in Figma", { nodeIds: z.array(z.string()).describe("Array of node IDs to get information about") }, async ({ nodeIds }) => { try { const results = await Promise.all( nodeIds.map(async (nodeId) => { const result = await sendCommandToFigma('get_node_info', { nodeId }); return { nodeId, info: result }; }) ); return { content: [ { type: "text", text: JSON.stringify(results.map((result) => filterFigmaNode(result.info))) } ] }; } catch (error) { return { content: [ { type: "text", text: `Error getting nodes info: ${error instanceof Error ? error.message : String(error)}` } ] }; } } );
  • Higher-level registration call within registerTools() that invokes registerDocumentTools(server), which includes the get_nodes_info tool registration.
    registerDocumentTools(server);

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/arinspunk/claude-talk-to-figma-mcp'

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