Skip to main content
Glama

figma_get_image_fills

Extract all image resources from a specified Figma file using your personal access token to streamline asset management and integration workflows.

Instructions

Get all image resources in the specified Figma file

Input Schema

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

Implementation Reference

  • Handler function for the 'figma_get_image_fills' tool. Calls api.imageFills and returns the result as JSON or error message. (Note: entire registration block is commented out)
    // async (o): Promise<CallToolResult> => { // try { // const data = await api.imageFills(o) // return { // content: [{type: 'text', text: JSON.stringify(data)}], // } // } catch (error: any) { // return { // content: [{type: 'text', text: `Error: ${error.message}`}], // } // } // },
  • Registration of the 'figma_get_image_fills' tool on the MCP server, including name, description, schema, and handler. Currently commented out.
    // server.tool( // 'figma_get_image_fills', // 'Get all image resources in the specified 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.imageFills(o) // return { // content: [{type: 'text', text: JSON.stringify(data)}], // } // } catch (error: any) { // return { // content: [{type: 'text', text: `Error: ${error.message}`}], // } // } // }, // )
  • Zod input schema for the figma_get_image_fills tool parameters.
    // { // fileKey: z.string().describe('Unique identifier of the Figma file'), // personalToken: z.string().optional().describe('Your Figma personal access token'), // },
  • Core helper function in FigmaRestApi that constructs the Figma API URL for image fills and fetches the data.
    async imageFills(o: GetKeyParams) { const url = this.opToUrl(`${this.figmaHost}/files/${o.fileKey}/images`, o) return this.fetch(url) }
  • TypeScript interface defining parameters for imageFills API call (used by the handler).
    export interface GetKeyParams { fileKey: string personalToken?: string }

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