Skip to main content
Glama

get_file_info

Retrieve basic file information from Figma designs using the file URL, including metadata and structural details for design analysis and integration workflows.

Instructions

获取Figma文件的基本信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesFigma文件URL

Implementation Reference

  • The primary handler function executing the 'get_file_info' tool. Parses the Figma URL argument, retrieves file metadata via FigmaService, computes counts for components, styles, and pages, and formats the response as MCP content.
    private async handleGetFileInfo(args: any) { const { url } = args; const urlInfo = this.figmaService.parseUrl(url); const file = await this.figmaService.getFile(urlInfo.fileId); return { content: [ { type: 'text', text: JSON.stringify({ success: true, data: { fileId: urlInfo.fileId, fileName: file.name, lastModified: file.lastModified, version: file.version, componentsCount: Object.keys(file.components || {}).length, stylesCount: Object.keys(file.styles || {}).length, pagesCount: file.document.children?.length || 0, }, }, null, 2), }, ], }; }
  • src/index.ts:126-139 (registration)
    Tool registration entry in the ListTools response, defining the name 'get_file_info', its description, and input schema requiring a Figma file URL.
    { name: 'get_file_info', description: '获取Figma文件的基本信息', inputSchema: { type: 'object', properties: { url: { type: 'string', description: 'Figma文件URL', }, }, required: ['url'], }, },
  • Input schema definition for the 'get_file_info' tool, specifying an object with a required 'url' string property.
    inputSchema: { type: 'object', properties: { url: { type: 'string', description: 'Figma文件URL', }, }, required: ['url'], },
  • src/index.ts:206-207 (registration)
    Dispatch case in the CallToolRequestSchema handler that routes 'get_file_info' calls to the handleGetFileInfo method.
    case 'get_file_info': return await this.handleGetFileInfo(args);

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/Echoxiawan/figma-mcp-full-server'

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