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; }

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