Skip to main content
Glama
MatthewDailey

Figma MCP Server

view_node

Retrieve a thumbnail image for a specific design element in a Figma file to visually identify and analyze components within your design projects.

Instructions

Get a thumbnail for a specific node in a Figma file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_keyYesThe key of the Figma file
node_idYesThe ID of the node to view. Node ids have the format `<number>:<number>`

Implementation Reference

  • Defines the Tool object for 'view_node' including name, description, and input schema.
    const VIEW_NODE: Tool = {
      name: "view_node",
      description: "Get a thumbnail for a specific node in a Figma file",
      inputSchema: {
        type: "object",
        properties: {
          file_key: {
            type: "string",
            description: "The key of the Figma file",
          },
          node_id: {
            type: "string",
            description: "The ID of the node to view. Node ids have the format `<number>:<number>`",
          },
        },
        required: ["file_key", "node_id"],
      },
    };
  • Implements the core logic of the view_node tool: fetches thumbnail using getThumbnails and returns it as a base64 image.
    async function doViewNode(fileKey: string, nodeId: string): Promise<CallToolResult> {
      const thumbnails = await getThumbnails(fileKey, [nodeId]);
      const nodeThumb = thumbnails[nodeId];
      if (!nodeThumb) {
        throw new Error(`Could not get thumbnail for node ${nodeId}`);
      }
      const b64 = await imageUrlToBase64(nodeThumb);
      return {
        content: [
          {
            type: "text",
            text: `Thumbnail for node ${nodeId}:`,
          },
          {
            type: "image",
            data: b64,
            mimeType: "image/png",
          },
        ],
      };
    }
  • index.ts:138-140 (registration)
    Registers the VIEW_NODE tool in the MCP server's list of available tools.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [ADD_FIGMA_FILE, VIEW_NODE, READ_COMMENTS, POST_COMMENT, REPLY_TO_COMMENT],
    }));
  • index.ts:270-273 (registration)
    Dispatches calls to the view_node tool by invoking the doViewNode handler.
    if (request.params.name === "view_node") {
      const input = request.params.arguments as { file_key: string; node_id: string };
      return doViewNode(input.file_key, input.node_id);
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool 'Get[s] a thumbnail,' implying a read-only operation, but doesn't disclose any behavioral traits such as authentication needs, rate limits, error conditions, or what the thumbnail output entails (e.g., format, size). This leaves significant gaps for a tool with no annotation support.

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 any wasted words. It's appropriately sized for a simple tool with two parameters, making it easy for an agent to parse quickly.

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

Completeness3/5

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

Given the tool's low complexity (2 parameters, no nested objects) and high schema coverage, the description is minimally adequate. However, with no annotations and no output schema, it fails to address behavioral aspects or return values, leaving the agent with incomplete context for safe and effective use.

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?

The input schema has 100% description coverage, with clear documentation for both parameters ('file_key' and 'node_id'), including format details for 'node_id'. The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline of 3 for high schema coverage.

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 action ('Get a thumbnail') and resource ('for a specific node in a Figma file'), making the purpose immediately understandable. However, it doesn't explicitly differentiate this tool from sibling tools like 'add_figma_file' or 'read_comments', which would require a 5.

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 prerequisites, context for thumbnail retrieval, or how it relates to sibling tools like 'add_figma_file' or 'post_comment', leaving the agent without usage direction.

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/MatthewDailey/figma-mcp'

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