Skip to main content
Glama
Figma Canvas MCP

Figma Canvas MCP

by AmroJSawan

figma_set_image_fill

Applies an image fill to one or more Figma nodes from base64 data or a JPEG/PNG file path, with FILL, FIT, CROP, or TILE scaling modes.

Instructions

Set an image fill on one or more Figma nodes. The imageData parameter accepts EITHER a base64-encoded image string (JPEG/PNG) OR an absolute file path starting with / (e.g. /tmp/photo.jpg). When a file path is provided, the server reads the image from disk — this is preferred for large images since it avoids parameter truncation. The image is decoded in the browser bridge and passed as raw bytes to the Figma plugin. Requires Canvas Bridge plugin.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "nodeIds": "<nodeIds>",
      "imageData": "<imageData>"
    },
    "name": "figma_set_image_fill"
  }
}

Input Schema

NameRequiredDescriptionDefault
nodeIdsYesArray of node IDs to apply the image fill to
imageDataYesBase64-encoded image data OR an absolute file path (starting with /) to a JPEG/PNG file on disk
scaleModeNoHow the image fills the node (default: FILL)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.17.3

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations present, the description carries the full burden and does a good job: it discloses that a path argument causes a server-side disk read, that bytes are decoded in the browser bridge and forwarded to the Figma plugin, and that the Canvas Bridge plugin is required. It does not say whether existing fills are replaced or appended, nor what happens on failure, which keeps it below 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four sentences, front-loaded with the operation, then the parameter contract, then the internal pipeline. Every sentence contributes, though the format sentence overlaps with what the schema already states, making it slightly redundant.

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

Completeness4/5

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

For a 3-parameter mutation tool with no annotations and no output schema, the description covers format, size trade-off, transport path, and the plugin prerequisite. The main remaining gap is the effect on pre-existing fills and any error or return behavior, but the essentials for a correct call are present.

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 coverage is 100%, so the schema already documents nodeIds, imageData, and scaleMode. The description largely restates the imageData dual-format contract and adds only the rationale for preferring file paths; scaleMode and nodeIds get no extra semantic detail, so the baseline 3 applies.

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 opens with a specific verb and resource: 'Set an image fill on one or more Figma nodes', which is concrete and actionable. It does not, however, distinguish itself from the nearby figma_set_fills sibling, leaving the agent to infer that this is the image-specific variant.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Guidance is given for choosing between the two imageData forms ('preferred for large images since it avoids parameter truncation'), which is genuinely useful. But there is no guidance on when to pick this tool over figma_set_fills or other fill-setting siblings, so tool-selection guidance is only implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools