Skip to main content
Glama

reply_to_comment

Respond to comments in Figma files directly via the Figma MCP Server. Input the file key, comment ID, and reply message to engage in design discussions efficiently.

Instructions

Reply to an existing comment in a Figma file

Input Schema

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

Implementation Reference

  • 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 (as REPLY_TO_COMMENT) in the list of available tools returned by listTools.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ADD_FIGMA_FILE, VIEW_NODE, READ_COMMENTS, POST_COMMENT, REPLY_TO_COMMENT], }));
  • The main handler function that executes the tool logic: calls the Figma API helper and formats the response.
    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), }, ], }; }
  • index.ts:291-298 (registration)
    Dispatch logic in callToolRequest handler that routes requests for reply_to_comment to the doReplyToComment function.
    if (request.params.name === "reply_to_comment") { const input = request.params.arguments as { file_key: string; comment_id: string; message: string; }; return doReplyToComment(input.file_key, input.comment_id, input.message); }
  • Core helper function that performs the HTTP POST request to the Figma API 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; }

Other Tools

Related 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