Skip to main content
Glama

get_file_info

Retrieve basic information from Figma files by providing the file URL. This tool extracts essential data about Figma designs for analysis and integration purposes.

Instructions

获取Figma文件的基本信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesFigma文件URL

Implementation Reference

  • The main handler function for the 'get_file_info' tool. It parses the Figma URL, fetches the file data using FigmaService, extracts basic file information (name, version, counts of components, styles, pages), and returns a JSON response.
    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), }, ], }; }
  • Input schema definition for the 'get_file_info' tool, specifying the required 'url' parameter as a string.
    inputSchema: { type: 'object', properties: { url: { type: 'string', description: 'Figma文件URL', }, }, required: ['url'], },
  • src/index.ts:206-207 (registration)
    Registration of the 'get_file_info' tool handler in the CallToolRequestSchema switch statement.
    case 'get_file_info': return await this.handleGetFileInfo(args);
  • src/index.ts:126-139 (registration)
    Tool metadata registration in the ListToolsRequestSchema response, including name, description, and input schema.
    { name: 'get_file_info', description: '获取Figma文件的基本信息', inputSchema: { type: 'object', properties: { url: { type: 'string', description: 'Figma文件URL', }, }, required: ['url'], }, },

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