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'],
      },
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states what the tool does ('获取基本信息'), without mentioning any traits like whether it's read-only, requires authentication, has rate limits, or what the output format might be. This is a significant gap for a tool with no annotation coverage.

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, efficient sentence in Chinese that directly states the tool's purpose without any wasted words. It is appropriately sized and front-loaded, making it easy to understand at a glance.

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. It doesn't explain what 'basic information' includes (e.g., metadata, structure, or other details), leaving gaps in understanding the tool's behavior and output, which is inadequate for a tool with no structured data support.

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 description adds no parameter-specific information beyond what the input schema provides. With schema description coverage at 100% (the 'url' parameter is documented as 'Figma文件URL'), the baseline score of 3 is appropriate, as the schema does the heavy lifting without additional value from the description.

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 ('获取' meaning 'get') and resource ('Figma文件的基本信息' meaning 'basic information of Figma file'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'get_figma_image' or 'get_figma_styles', which also retrieve Figma-related information, so it doesn't reach the highest score.

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. With sibling tools like 'get_figma_image' and 'get_figma_styles' available, there's no indication of what distinguishes this tool (e.g., that it retrieves general metadata vs. specific assets or styles), leaving usage context implied at best.

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

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