Skip to main content
Glama

get_image_fills

Retrieve image URLs from Figma files to access embedded graphics and visual assets for external use or integration.

Instructions

Get URLs for images used in a Figma file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileKeyYesThe key of the file to get image fills from

Implementation Reference

  • The main handler function that implements the get_image_fills tool logic by making an authenticated request to the Figma API endpoint `/files/{fileKey}/images` to retrieve URLs for images used as fills in the file.
    async getImageFills(args: GetImageFillsArgs) {
      const { fileKey } = args;
      
      return this.api.makeRequest(`/files/${fileKey}/images`);
    }
  • TypeScript interface defining the input arguments for the get_image_fills tool: requires a 'fileKey' string.
    export interface GetImageFillsArgs {
      fileKey: string;
    }
  • src/index.ts:207-220 (registration)
    Registers the 'get_image_fills' tool in the MCP server's tool list, including name, description, and input schema for validation.
    {
      name: 'get_image_fills',
      description: 'Get URLs for images used in a Figma file',
      inputSchema: {
        type: 'object',
        properties: {
          fileKey: {
            type: 'string',
            description: 'The key of the file to get image fills from'
          }
        },
        required: ['fileKey']
      },
    },
  • src/index.ts:514-520 (registration)
    Dispatch handler in the CallToolRequest that validates arguments and delegates execution to the filesHandler.getImageFills method.
    case 'get_image_fills': {
      const args = this.validateArgs<GetImageFillsArgs>(request.params.arguments, ['fileKey']);
      const result = await this.filesHandler.getImageFills(args);
      return {
        content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
      };
    }
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 mentions retrieving URLs but does not specify whether this is a read-only operation, requires authentication, involves rate limits, or what happens on errors. For a tool with no annotation coverage, this is a significant gap in transparency.

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 unnecessary words. It is front-loaded and appropriately sized, 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.

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 does not explain what the URLs represent (e.g., temporary vs. permanent), the format of the response, or any error conditions. For a tool that retrieves data, more context is needed to guide effective usage.

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 the parameter 'fileKey' well-documented in the schema. The description adds no additional meaning beyond implying the tool operates on a Figma file, which is already clear from the schema. Baseline 3 is appropriate as the schema handles parameter documentation adequately.

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 URLs') and resource ('images used in a Figma file'), providing a specific purpose. However, it does not distinguish this tool from sibling tools like 'get_image' or 'get_file_nodes', which might also retrieve image-related data, leaving some ambiguity about its unique role.

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 offers no guidance on when to use this tool versus alternatives, such as 'get_image' or 'get_file_nodes'. It lacks context about prerequisites (e.g., needing a valid file key) or exclusions, leaving the agent to infer usage from the name 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

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/smithery-ai/mcp-figma'

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