Skip to main content
Glama

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; }

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