Skip to main content
Glama
MatthewDailey

Figma MCP Server

reply_to_comment

Add a reply to an existing comment in a Figma file to provide feedback, answer questions, or continue design discussions directly within the Figma MCP Server.

Instructions

Reply to an existing comment in a Figma file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_keyYesThe key of the Figma file
comment_idYesThe ID of the comment to reply to. Comment ids have the format `<number>`
messageYesThe reply message

Implementation Reference

  • The handler function that executes the reply_to_comment tool logic by calling the replyToComment helper and formatting the result.
    async function doReplyToComment(
      fileKey: string,
      commentId: string,
      message: string
    ): Promise<CallToolResult> {
      const data = await replyToComment(fileKey, commentId, message);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(data, null, 2),
          },
        ],
      };
    }
  • Defines the Tool object for 'reply_to_comment' including name, description, and input schema.
    const REPLY_TO_COMMENT: Tool = {
      name: "reply_to_comment",
      description: "Reply to an existing comment in a Figma file",
      inputSchema: {
        type: "object",
        properties: {
          file_key: {
            type: "string",
            description: "The key of the Figma file",
          },
          comment_id: {
            type: "string",
            description: "The ID of the comment to reply to. Comment ids have the format `<number>`",
          },
          message: {
            type: "string",
            description: "The reply message",
          },
        },
        required: ["file_key", "comment_id", "message"],
      },
    };
  • index.ts:138-140 (registration)
    Registers the REPLY_TO_COMMENT tool in the server's list of available tools.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [ADD_FIGMA_FILE, VIEW_NODE, READ_COMMENTS, POST_COMMENT, REPLY_TO_COMMENT],
    }));
  • Helper function that makes the actual API call to Figma to reply to a comment.
    export async function replyToComment(fileKey: string, commentId: string, message: string) {
      const response = await axios.post(
        `https://api.figma.com/v1/files/${fileKey}/comments`,
        {
          message,
          comment_id: commentId,
        },
        {
          headers: {
            "X-FIGMA-TOKEN": getFigmaApiKey(),
            "Content-Type": "application/json",
          },
        }
      );
      return response.data;
    }
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 performs a write operation ('Reply to'), implying mutation, but doesn't mention permissions required, whether replies are editable/deletable, rate limits, or what the response looks like. This leaves significant gaps for a mutation tool with zero annotation coverage.

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 directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy to understand at a glance.

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 this is a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't cover behavioral aspects like permissions, side effects, or response format, which are critical for safe and effective use. The high schema coverage helps with parameters, but overall context is lacking.

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 schema description coverage is 100%, with all three parameters clearly documented in the input schema. The description adds no additional parameter semantics beyond what's already in the schema (e.g., it doesn't explain format details or constraints for 'comment_id' or 'message'). This meets the baseline 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 ('Reply to') and target ('an existing comment in a Figma file'), making the purpose immediately understandable. However, it doesn't explicitly distinguish this tool from sibling tools like 'post_comment' or 'read_comments', which would require more specific differentiation to earn 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 like 'post_comment' (which might create new comments) or 'read_comments' (which retrieves comments). There's no mention of prerequisites, such as needing an existing comment to reply to, or contextual factors that would influence tool selection.

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