Skip to main content
Glama
ArchimedesCrypto

Figma MCP Server with Chunking

get_file_comments

Retrieve comments from Figma files using the Figma MCP Server with Chunking, enabling efficient handling of large files through memory-aware chunking and pagination.

Instructions

Get comments on a Figma file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_keyYesFigma file key

Implementation Reference

  • src/index.ts:178-191 (registration)
    Tool registration including name, description, and input schema for get_file_comments
    {
      name: 'get_file_comments',
      description: 'Get comments on a Figma file',
      inputSchema: {
        type: 'object',
        properties: {
          file_key: {
            type: 'string',
            description: 'Figma file key'
          }
        },
        required: ['file_key']
      }
    },
  • MCP tool handler for get_file_comments: validates args, calls figmaClient.getFileComments, returns JSON stringified response
    case 'get_file_comments': {
      const args = request.params.arguments as unknown as FileKeyArgs;
      if (!args.file_key) {
        throw new McpError(ErrorCode.InvalidParams, 'file_key is required');
      }
      console.debug('[MCP Debug] Fetching file comments', {
        fileKey: args.file_key,
      });
      const data = await this.figmaClient.getFileComments(args.file_key);
      return {
        content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
      };
    }
  • Core implementation: makes API call to Figma /files/{fileKey}/comments endpoint and returns the data
    async getFileComments(fileKey: string) {
      try {
        console.debug('[MCP Debug] Getting comments for file:', fileKey);
        const response = await this.client.get(`/files/${fileKey}/comments`);
        
        if (this.nodeProcessor.hasReachedLimit()) {
          console.debug('[MCP Debug] Memory limit reached while processing comments');
          throw new Error('Memory limit exceeded while processing comments');
        }
    
        return response.data;
      } catch (error) {
        console.error('[MCP Error] Failed to get file comments:', error);
        throw error;
      }
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does but doesn't add any context beyond that—such as whether it's read-only, requires authentication, has rate limits, returns paginated results, or what the output format might be. This leaves significant gaps for an agent to understand how to interact with it effectively.

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, clear sentence with no wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly. Every part of the sentence contributes directly to understanding the tool's purpose.

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?

Given the lack of annotations and output schema, the description is incomplete for a tool that likely returns structured data (comments). It doesn't explain what the output includes (e.g., comment text, authors, timestamps) or any behavioral traits, leaving the agent with insufficient context to use the tool effectively beyond the basic parameter.

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?

The input schema has 100% description coverage, with the 'file_key' parameter clearly documented as a 'Figma file key'. The description doesn't add any extra meaning beyond this, such as examples or format details, but since the schema already provides adequate information, a baseline score of 3 is appropriate.

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 verb ('Get') and resource ('comments on a Figma file'), making the purpose immediately understandable. However, it doesn't differentiate this tool from its siblings like 'get_file_data' or 'get_file_nodes', which might also retrieve file-related information but focus on different aspects.

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 scenarios where this is appropriate (e.g., for reviewing feedback) or when to choose other tools like 'get_file_data' for different file metadata, leaving the agent to infer usage from the name alone.

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

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/ArchimedesCrypto/figma-mcp-chunked'

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