Skip to main content
Glama
MatthewDailey

Figma MCP Server

read_comments

Retrieve all comments from a Figma file to review feedback and track design discussions within collaborative projects.

Instructions

Get all comments on a Figma file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_keyYesThe key of the Figma file

Implementation Reference

  • Dedicated handler function for the read_comments tool that fetches comments using the helper and returns formatted JSON response as CallToolResult.
    async function doReadComments(fileKey: string): Promise<CallToolResult> {
      const data = await readComments(fileKey);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(data, null, 2),
          },
        ],
      };
    }
  • Tool schema defining name, description, and input schema for read_comments.
    const READ_COMMENTS: Tool = {
      name: "read_comments",
      description: "Get all comments on a Figma file",
      inputSchema: {
        type: "object",
        properties: {
          file_key: {
            type: "string",
            description: "The key of the Figma file",
          },
        },
        required: ["file_key"],
      },
    };
  • index.ts:138-140 (registration)
    Registration of the read_comments tool (as READ_COMMENTS) in the list of available tools returned by ListToolsRequest.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [ADD_FIGMA_FILE, VIEW_NODE, READ_COMMENTS, POST_COMMENT, REPLY_TO_COMMENT],
    }));
  • Dispatch logic within the main CallToolRequest handler that routes calls to the read_comments tool to its dedicated handler.
    if (request.params.name === "read_comments") {
      const input = request.params.arguments as { file_key: string };
      return doReadComments(input.file_key);
  • Supporting utility function that performs the actual Figma API request to fetch comments for the given file key.
    export async function readComments(fileKey: string) {
      const response = await axios.get(`https://api.figma.com/v1/files/${fileKey}/comments`, {
        headers: {
          "X-FIGMA-TOKEN": getFigmaApiKey(),
        },
      });
      return response.data;
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.9/5.0
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. While 'Get all comments' implies a read operation, it doesn't specify whether this requires authentication, rate limits, pagination behavior, or what format the comments are returned in. This leaves significant gaps for a tool that presumably interacts with an external API.

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 with zero wasted words. It's appropriately sized for a simple tool and front-loads the essential information.

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?

For a tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what 'all comments' means in practice (e.g., format, structure, limitations), nor does it address authentication requirements or error conditions that would be important for an API interaction tool.

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 description mentions 'on a Figma file' which aligns with the single 'file_key' parameter, but adds no additional semantic context beyond what the schema already provides (100% coverage). The baseline score of 3 is appropriate since the schema fully documents the parameter.

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 all comments') and target resource ('on a Figma file'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'view_node' or 'post_comment' that might also involve Figma file interactions, so it doesn't reach the highest clarity level.

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 like 'post_comment' or 'reply_to_comment'. There's no mention of prerequisites, context for retrieving comments, or any explicit when/when-not instructions.

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