Skip to main content
Glama

figma_get_file_meta

Retrieve metadata for a Figma file by providing its unique file key and personal access token. Streamline design file analysis and integration.

Instructions

Get metadata information for a Figma file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileKeyYesUnique identifier of the Figma file
personalTokenNoYour Figma personal access token

Implementation Reference

  • Registration of the figma_get_file_meta tool (commented out), including Zod input schema, description, and inline handler that calls api.meta(o).
    // server.tool(
    //   'figma_get_file_meta',
    //   'Get metadata information for a Figma file',
    //   {
    //     fileKey: z.string().describe('Unique identifier of the Figma file'),
    //     personalToken: z.string().optional().describe('Your Figma personal access token'),
    //   },
    //   async (o): Promise<CallToolResult> => {
    //     try {
    //       const data = await api.meta(o)
    //       return {
    //         content: [{type: 'text', text: JSON.stringify(data)}],
    //       }
    //     } catch (error: any) {
    //       return {
    //         content: [{type: 'text', text: `Error: ${error.message}`}],
    //       }
    //     }
    //   },
    // )
  • Tool handler function: invokes api.meta(o), stringifies the result as JSON text, or returns error message.
    //   async (o): Promise<CallToolResult> => {
    //     try {
    //       const data = await api.meta(o)
    //       return {
    //         content: [{type: 'text', text: JSON.stringify(data)}],
    //       }
    //     } catch (error: any) {
    //       return {
    //         content: [{type: 'text', text: `Error: ${error.message}`}],
    //       }
    //     }
    //   },
  • Helper method in FigmaRestApi class that constructs the /files/{fileKey}/meta URL and fetches the metadata using the configured token.
    // Returns the metadata for the file referred to by :key
    async meta(o: GetKeyParams) {
      const url = this.opToUrl(`${this.figmaHost}/files/${o.fileKey}/meta`, o)
      return this.fetch(url)
    }
  • TypeScript interface defining parameters for the meta API: required fileKey and optional personalToken.
    export interface GetKeyParams {
      fileKey: string
      personalToken?: string
    }
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/f2c-ai/f2c-mcp'

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