Skip to main content
Glama
ArchimedesCrypto

Figma MCP Server with Chunking

get_file_data

Retrieve and manage Figma file data efficiently using chunking and pagination. Filter by node types, control response size, and optimize memory usage for large-scale Figma projects.

Instructions

Get Figma file data with chunking and pagination

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cursorNoPagination cursor for continuing from a previous request
depthNoMaximum depth to traverse in the node tree
excludePropsNoProperties to exclude from node data
file_keyYesFigma file key
maxMemoryMBNoMaximum memory usage in MB
maxResponseSizeNoMaximum response size in MB (defaults to 50)
nodeTypesNoFilter nodes by type
pageSizeNoNumber of nodes per page
summarizeNodesNoReturn only essential node properties to reduce response size

Implementation Reference

  • Executes the get_file_data tool: validates arguments, calls ChunkedFigmaClient.getFileInfoChunked with chunking parameters, and returns paginated node data as JSON.
    case 'get_file_data': {
      const args = request.params.arguments as unknown as GetFileDataArgs;
      if (!args.file_key) {
        throw new McpError(ErrorCode.InvalidParams, 'file_key is required');
      }
    
      console.debug('[MCP Debug] Fetching file data with chunking', {
        fileKey: args.file_key,
        pageSize: args.pageSize,
        maxMemoryMB: args.maxMemoryMB,
        nodeTypes: args.nodeTypes,
        maxResponseSize: args.maxResponseSize,
        excludeProps: args.excludeProps,
        summarizeNodes: args.summarizeNodes
      });
    
      const result = await this.figmaClient.getFileInfoChunked(
        args.file_key,
        args.cursor,
        args.depth,
        {
          pageSize: args.pageSize,
          maxMemoryMB: args.maxMemoryMB,
          nodeTypes: args.nodeTypes,
          maxResponseSize: args.maxResponseSize,
          excludeProps: args.excludeProps,
          summarizeNodes: args.summarizeNodes
        }
      );
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              nodes: result.nodes,
              memoryUsage: result.memoryUsage,
              nextCursor: result.nextCursor,
              hasMore: result.hasMore
            }, null, 2)
          }
        ]
      };
    }
  • src/index.ts:77-146 (registration)
    Registers the get_file_data tool in the list_tools handler, defining its name, description, and JSON input schema for MCP protocol.
    {
      name: 'get_file_data',
      description: 'Get Figma file data with chunking and pagination',
      inputSchema: {
        type: 'object',
        properties: {
          file_key: {
            type: 'string',
            description: 'Figma file key'
          },
          pageSize: {
            type: 'number',
            description: 'Number of nodes per page',
            minimum: 1,
            maximum: 1000
          },
          maxMemoryMB: {
            type: 'number',
            description: 'Maximum memory usage in MB',
            minimum: 128,
            maximum: 2048
          },
          nodeTypes: {
            type: 'array',
            items: {
              type: 'string',
              enum: [
                'FRAME',
                'GROUP',
                'VECTOR',
                'BOOLEAN_OPERATION',
                'STAR',
                'LINE',
                'TEXT',
                'COMPONENT',
                'INSTANCE'
              ]
            },
            description: 'Filter nodes by type'
          },
          cursor: {
            type: 'string',
            description: 'Pagination cursor for continuing from a previous request'
          },
          depth: {
            type: 'number',
            description: 'Maximum depth to traverse in the node tree',
            minimum: 1
          },
          maxResponseSize: {
            type: 'number',
            description: 'Maximum response size in MB (defaults to 50)',
            minimum: 1,
            maximum: 100
          },
          excludeProps: {
            type: 'array',
            items: {
              type: 'string'
            },
            description: 'Properties to exclude from node data'
          },
          summarizeNodes: {
            type: 'boolean',
            description: 'Return only essential node properties to reduce response size'
          }
        },
        required: ['file_key']
      }
    },
  • TypeScript interface defining the typed arguments for the get_file_data handler.
    interface GetFileDataArgs {
      file_key: string;
      pageSize?: number;
      maxMemoryMB?: number;
      nodeTypes?: string[];
      cursor?: string;
      depth?: number;
      maxResponseSize?: number;
      excludeProps?: string[];
      summarizeNodes?: boolean;
    }
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 hints at pagination and chunking but doesn't explain how these work, what the response format looks like, error conditions, rate limits, or authentication needs. For a tool with 9 parameters and no annotations, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that gets straight to the point. It's appropriately sized and front-loaded with the core purpose, though it could be slightly more structured by separating key features.

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 complexity (9 parameters, no annotations, no output schema), the description is incomplete. It doesn't address the tool's output format, error handling, or how pagination and chunking interact with parameters like 'pageSize' and 'maxResponseSize'. For a data retrieval tool with rich parameters, more context is needed.

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 schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds no additional meaning beyond what's in the schema—it doesn't clarify parameter interactions, defaults, or usage examples. Baseline 3 is appropriate when the schema does the heavy lifting.

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 ('Get') and resource ('Figma file data'), making the purpose understandable. However, it doesn't differentiate this tool from sibling tools like 'get_file_nodes' or 'get_file_versions', which likely retrieve similar data but with different scopes or formats.

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 mentions 'chunking and pagination' but provides no explicit guidance on when to use this tool versus alternatives like 'get_file_nodes' or 'get_file_comments'. There's no mention of prerequisites, exclusions, or specific scenarios where this tool is preferred over siblings.

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