Skip to main content
Glama

get_image

Extract images from specific nodes in a Figma file by providing file keys and node IDs, with options for scaling, format selection, and SVG customization.

Instructions

Get images for nodes in a Figma file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileKeyYesThe key of the file to get images from
idsYesArray of node IDs to render
scaleNoOptional. Scale factor to render at (0.01-4)
formatNoOptional. Image format
svg_include_idNoOptional. Include IDs in SVG output
svg_simplify_strokeNoOptional. Simplify strokes in SVG output
use_absolute_boundsNoOptional. Use absolute bounds

Implementation Reference

  • The core handler function for the 'get_image' tool. It constructs query parameters from args and makes a request to Figma's /images/{fileKey} endpoint.
    async getImage(args: GetImageArgs) {
      const { fileKey, ids, scale, format, svg_include_id, svg_simplify_stroke, use_absolute_bounds } = args;
      
      const params: Record<string, string | number | boolean | undefined> = {
        ids: ids.join(','),
        scale,
        format,
        svg_include_id,
        svg_simplify_stroke,
        use_absolute_bounds
      };
    
      return this.api.makeRequest(`/images/${fileKey}${this.api.buildQueryString(params)}`);
  • src/index.ts:167-205 (registration)
    Registration of the 'get_image' tool in the MCP server, including name, description, and detailed input schema.
    {
      name: 'get_image',
      description: 'Get images for nodes in a Figma file',
      inputSchema: {
        type: 'object',
        properties: {
          fileKey: {
            type: 'string',
            description: 'The key of the file to get images from'
          },
          ids: {
            type: 'array',
            items: { type: 'string' },
            description: 'Array of node IDs to render'
          },
          scale: {
            type: 'number',
            description: 'Optional. Scale factor to render at (0.01-4)'
          },
          format: {
            type: 'string',
            enum: ['jpg', 'png', 'svg', 'pdf'],
            description: 'Optional. Image format'
          },
          svg_include_id: {
            type: 'boolean',
            description: 'Optional. Include IDs in SVG output'
          },
          svg_simplify_stroke: {
            type: 'boolean',
            description: 'Optional. Simplify strokes in SVG output'
          },
          use_absolute_bounds: {
            type: 'boolean',
            description: 'Optional. Use absolute bounds'
          }
        },
        required: ['fileKey', 'ids']
      },
  • TypeScript interface defining the input arguments for the getImage handler, used for validation.
    export interface GetImageArgs {
      fileKey: string;
      ids: string[];
      scale?: number;
      format?: 'jpg' | 'png' | 'svg' | 'pdf';
      svg_include_id?: boolean;
      svg_simplify_stroke?: boolean;
      use_absolute_bounds?: boolean;
  • src/index.ts:506-511 (registration)
    Dispatch handler for 'get_image' tool calls, validates args and invokes filesHandler.getImage.
    case 'get_image': {
      const args = this.validateArgs<GetImageArgs>(request.params.arguments, ['fileKey', 'ids']);
      const result = await this.filesHandler.getImage(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 states what the tool does but lacks critical details: it doesn't mention whether this is a read-only operation, potential rate limits, authentication needs, or what the output looks like (e.g., image data format). For a tool with 7 parameters and no annotations, this is insufficient.

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's appropriately sized and front-loaded, with zero waste, 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 complexity (7 parameters, no annotations, no output schema), the description is incomplete. It doesn't address behavioral aspects like safety, output format, or error handling, which are crucial for an agent to use this tool effectively. The high parameter count and lack of structured output information exacerbate this gap.

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?

Schema description coverage is 100%, meaning all parameters are documented in the schema itself. The description adds no additional parameter semantics beyond the schema, such as explaining relationships between parameters (e.g., how 'format' interacts with 'svg_include_id'). Baseline 3 is appropriate when the schema does the heavy lifting.

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 verb ('Get') and resource ('images for nodes in a Figma file'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_file' or 'get_file_nodes', which might also retrieve file-related data, so it's not a perfect 5.

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 siblings like 'get_file' and 'get_file_nodes' that might overlap in retrieving file content, the lack of explicit usage context or exclusions leaves the agent without clear direction.

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