Skip to main content
Glama

get_comments

Retrieve comments from a Figma file to review feedback and track design discussions.

Instructions

Get comments on a Figma file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileKeyYesThe key of the file to get comments from

Implementation Reference

  • The core handler function that makes an API request to retrieve comments for a Figma file using the provided fileKey.
    async getComments(args: GetCommentsArgs) {
      const { fileKey } = args;
      
      return this.api.makeRequest(`/files/${fileKey}/comments`);
    }
  • src/index.ts:221-233 (registration)
    Tool registration in the listTools response, defining the name, description, and input schema for 'get_comments'.
    {
      name: 'get_comments',
      description: 'Get comments on a Figma file',
      inputSchema: {
        type: 'object',
        properties: {
          fileKey: {
            type: 'string',
            description: 'The key of the file to get comments from'
          }
        },
        required: ['fileKey']
      },
  • src/index.ts:522-527 (registration)
    Dispatch logic in the CallToolRequest handler that routes 'get_comments' calls to the filesHandler.getComments method.
    case 'get_comments': {
      const args = this.validateArgs<GetCommentsArgs>(request.params.arguments, ['fileKey']);
      const result = await this.filesHandler.getComments(args);
      return {
        content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
      };
  • TypeScript interface defining the input arguments for the get_comments tool.
    export interface GetCommentsArgs {
      fileKey: string;
    }

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