Skip to main content
Glama
arinspunk

Claude Talk to Figma MCP

by arinspunk

get_node_info

Retrieve detailed information about specific Figma design elements by providing their node ID, enabling AI-assisted design analysis and interaction.

Instructions

Get detailed information about a specific node in Figma

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeIdYesThe ID of the node to get information about

Implementation Reference

  • The core handler for the 'get_node_info' MCP tool. It proxies the request to Figma using sendCommandToFigma, filters the node data, and returns it as JSON text content. Includes error handling.
    server.tool(
      "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 parameter.
    {
      nodeId: z.string().describe("The ID of the node to get information about"),
    },
  • Supporting helper function filterFigmaNode that recursively filters Figma node objects, converts RGBA colors to hex, removes unnecessary properties like boundVariables, skips VECTOR nodes, and preserves essential properties for MCP response.
    export function filterFigmaNode(node: any) {
      // Skip VECTOR type nodes
      if (node.type === "VECTOR") {
        return null;
      }
    
      const filtered: any = {
        id: node.id,
        name: node.name,
        type: node.type,
      };
    
      if (node.fills && node.fills.length > 0) {
        filtered.fills = node.fills.map((fill: any) => {
          const processedFill = { ...fill };
    
          // Remove boundVariables and imageRef
          delete processedFill.boundVariables;
          delete processedFill.imageRef;
    
          // Process gradientStops if present
          if (processedFill.gradientStops) {
            processedFill.gradientStops = processedFill.gradientStops.map((stop: any) => {
              const processedStop = { ...stop };
              // Convert color to hex if present
              if (processedStop.color) {
                processedStop.color = rgbaToHex(processedStop.color);
              }
              // Remove boundVariables
              delete processedStop.boundVariables;
              return processedStop;
            });
          }
    
          // Convert solid fill colors to hex
          if (processedFill.color) {
            processedFill.color = rgbaToHex(processedFill.color);
          }
    
          return processedFill;
        });
      }
    
      if (node.strokes && node.strokes.length > 0) {
        filtered.strokes = node.strokes.map((stroke: any) => {
          const processedStroke = { ...stroke };
          // Remove boundVariables
          delete processedStroke.boundVariables;
          // Convert color to hex if present
          if (processedStroke.color) {
            processedStroke.color = rgbaToHex(processedStroke.color);
          }
          return processedStroke;
        });
      }
    
      if (node.cornerRadius !== undefined) {
        filtered.cornerRadius = node.cornerRadius;
      }
    
      if (node.absoluteBoundingBox) {
        filtered.absoluteBoundingBox = node.absoluteBoundingBox;
      }
    
      if (node.characters) {
        filtered.characters = node.characters;
      }
    
      if (node.style) {
        filtered.style = {
          fontFamily: node.style.fontFamily,
          fontStyle: node.style.fontStyle,
          fontWeight: node.style.fontWeight,
          fontSize: node.style.fontSize,
          textAlignHorizontal: node.style.textAlignHorizontal,
          letterSpacing: node.style.letterSpacing,
          lineHeightPx: node.style.lineHeightPx
        };
      }
    
      if (node.children) {
        filtered.children = node.children
          .map((child: any) => filterFigmaNode(child))
          .filter((child: any) => child !== null); // Remove null children (VECTOR nodes)
      }
    
      return filtered;
    }
  • Call to registerDocumentTools which includes the get_node_info tool registration.
    registerDocumentTools(server);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It indicates a read operation ('Get') but doesn't disclose critical traits like whether it requires authentication, rate limits, error conditions (e.g., invalid node IDs), or the format/scope of returned information. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose without unnecessary words. Every part ('Get detailed information about a specific node in Figma') earns its place by specifying the action, resource, and context concisely.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and a simple input schema, the description is incomplete for effective use. It doesn't explain what 'detailed information' includes (e.g., properties, metadata), potential side effects, or error handling. For a read tool in a context-rich environment like Figma with many siblings, more context is needed to guide the agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the single parameter 'nodeId' well-documented in the schema as 'The ID of the node to get information about'. The description adds no additional parameter context beyond implying it fetches data for 'a specific node', which aligns with but doesn't enhance the schema. Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and resource 'detailed information about a specific node in Figma', making the purpose unambiguous. It distinguishes from siblings like 'get_document_info' (broader scope) and 'get_nodes_info' (plural nodes) by specifying 'specific node'. However, it doesn't explicitly contrast with all similar siblings like 'get_selection' or 'get_styled_text_segments', preventing a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose 'get_node_info' over 'get_nodes_info' (for multiple nodes) or 'get_document_info' (for document-level data), nor does it specify prerequisites like needing a valid node ID. Usage is implied but not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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