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
    }
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 states it's a 'Get' operation, implying read-only behavior, but doesn't clarify aspects like authentication needs (though 'personalToken' is in the schema), rate limits, error handling, or what 'image resources' entails (e.g., formats, metadata). 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 that directly states the tool's purpose without any fluff or redundancy. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks details on usage guidelines, behavioral traits, and output expectations, which are needed for full contextual understanding. Without annotations or an output schema, the description should do more to compensate.

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 schema description coverage is 100%, with clear descriptions for both parameters ('fileKey' and 'personalToken'), so the schema does the heavy lifting. The description adds no additional meaning beyond implying the tool operates on a 'specified Figma file', which aligns with the schema but doesn't provide extra context like file format or token usage details.

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 ('Get') and resource ('all image resources in the specified Figma file'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'figma_get_images' or 'figma_get_file_data', which might also retrieve image-related data, so it doesn't reach a perfect 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 'figma_get_images' and 'figma_get_file_data' that might overlap in functionality, there's no indication of context, prerequisites, or exclusions, leaving the agent to guess based on tool names alone.

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

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