Skip to main content
Glama

post_comment

Add comments to Figma files to provide feedback, mark specific elements, or reply to existing discussions for collaborative design review.

Instructions

Post a comment on a Figma file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileKeyYesThe key of the file to comment on
messageYesComment message text
client_metaNoOptional. Position of the comment
comment_idNoOptional. ID of comment to reply to

Implementation Reference

  • The core handler function for the 'post_comment' tool. It destructures the fileKey and comment data from args and makes a POST request to the Figma API endpoint for comments.
    async postComment(args: PostCommentArgs) {
      const { fileKey, ...commentData } = args;
      
      return this.api.makeRequest(`/files/${fileKey}/comments`, 'POST', commentData);
    }
  • TypeScript interface defining the input arguments for the post_comment tool, used for type checking.
    export interface PostCommentArgs {
      fileKey: string;
      message: string;
      client_meta?: {
        x: number;
        y: number;
        node_id?: string;
        node_offset?: {
          x: number;
          y: number;
        };
      };
      comment_id?: string;
    }
  • src/index.ts:235-272 (registration)
    MCP tool registration in ListTools handler, defining the name, description, and input schema for 'post_comment'.
    {
      name: 'post_comment',
      description: 'Post a comment on a Figma file',
      inputSchema: {
        type: 'object',
        properties: {
          fileKey: {
            type: 'string',
            description: 'The key of the file to comment on'
          },
          message: {
            type: 'string',
            description: 'Comment message text'
          },
          client_meta: {
            type: 'object',
            properties: {
              x: { type: 'number' },
              y: { type: 'number' },
              node_id: { type: 'string' },
              node_offset: {
                type: 'object',
                properties: {
                  x: { type: 'number' },
                  y: { type: 'number' }
                }
              }
            },
            description: 'Optional. Position of the comment'
          },
          comment_id: {
            type: 'string',
            description: 'Optional. ID of comment to reply to'
          }
        },
        required: ['fileKey', 'message']
      },
    },
  • src/index.ts:530-536 (registration)
    MCP CallTool request handler case for 'post_comment', which validates args and delegates to FilesHandler.postComment.
    case 'post_comment': {
      const args = this.validateArgs<PostCommentArgs>(request.params.arguments, ['fileKey', 'message']);
      const result = await this.filesHandler.postComment(args);
      return {
        content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
      };
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. 'Post a comment' implies a write/mutation operation, but the description doesn't mention authentication requirements, rate limits, whether comments are public/private, notification behavior, or what happens on success/failure. It provides minimal behavioral context beyond the basic action.

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 states the core purpose without any wasted words. It's appropriately sized for a simple tool and front-loads the essential information immediately.

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 mutation tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what the tool returns, error conditions, authentication needs, or how it fits within the broader Figma commenting system. The 100% schema coverage helps with parameters, but other critical contextual information is missing.

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?

Schema description coverage is 100%, so the schema already documents all 4 parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema. The baseline score of 3 reflects adequate coverage through the schema alone, with no value added by the description.

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 ('Post a comment') and target resource ('on a Figma file'), providing a specific verb+resource combination. However, it doesn't distinguish this tool from its sibling 'delete_comment' beyond the obvious action difference, nor does it mention what distinguishes it from 'get_comments' beyond the write vs. read operation.

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. It doesn't mention prerequisites (like authentication via 'set_api_key'), when to use 'post_comment' versus 'get_comments' or 'delete_comment', or any contextual constraints for posting comments in Figma workflows.

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/smithery-ai/mcp-figma'

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