Skip to main content
Glama

post_comment

Add comments to specific nodes in Figma files by specifying the file key, node ID, message, and pin coordinates. Facilitates precise feedback and collaboration within Figma workflows.

Instructions

Post a comment on a node in a Figma file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_keyYesThe key of the Figma file
messageYesThe comment message
node_idNoThe ID of the node to comment on. Node ids have the format `<number>:<number>`
xYesThe x coordinate of the comment pin
yYesThe y coordinate of the comment pin

Implementation Reference

  • The handler function that executes the post_comment tool by making a POST request to the Figma API to add a comment to a file.
    private async postComment(args: any) {
      const response = await this.axiosInstance.post(`/files/${args.file_key}/comments`, {
        message: args.message,
      });
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(response.data, null, 2),
          },
        ],
      };
    }
  • Input schema defining the parameters for the post_comment tool: file_key (string) and message (string), both required.
    inputSchema: {
      type: 'object',
      properties: {
        file_key: {
          type: 'string',
          description: 'The Figma file key',
        },
        message: {
          type: 'string',
          description: 'The comment message',
        },
      },
      required: ['file_key', 'message'],
    },
  • src/index.ts:132-149 (registration)
    Registration of the post_comment tool in the ListToolsRequestSchema handler, including name, description, and input schema.
    {
      name: 'post_comment',
      description: 'Post a comment to a Figma file',
      inputSchema: {
        type: 'object',
        properties: {
          file_key: {
            type: 'string',
            description: 'The Figma file key',
          },
          message: {
            type: 'string',
            description: 'The comment message',
          },
        },
        required: ['file_key', 'message'],
      },
    },
  • src/index.ts:58-59 (registration)
    Tool dispatch in the CallToolRequestSchema handler switch statement, routing post_comment calls to the postComment method.
    case 'post_comment':
      return await this.postComment(request.params.arguments);
Install Server

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

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