Skip to main content
Glama
Rompni

figma-rest-mcp

by Rompni

Bundle image fills as data URIs

bundle_image_fills
Read-only

Fetches image fills from a Figma file and converts them into data URIs with metadata, skipping assets over a size limit. Ideal for design-to-code workflows needing local image access.

Instructions

Design-to-code helper: GET /v1/files/{key}/images then download each fill (Figma/S3 hosts only). Returns imageRef → { contentType, byteLength, dataUri }. Skips assets over max_bytes (default 250KB). Not canvas mutation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesFigma file key or URL (figma.com/design/... or figma.com/file/...)
max_bytesNo
image_refsNoOptional imageRef filter (comma-separated or array).
max_assetsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.5.0

TDQS

A4.2/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint, openWorldHint), it discloses the multi-step nature (GET + downloads), the host restriction, the specific output shape, the skip policy with a default, and explicitly states 'Not canvas mutation' confirming non-destructiveness. This adds meaningful operational context beyond the annotation flags.

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?

Each of the four sentences carries distinct information: role, endpoint/mechanism, output, skip policy, and non-mutation. There is no filler and the key purpose is front-loaded. Even the final 'Not canvas mutation' earns its place by removing any ambiguity about mutability, reinforced by existing annotations.

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?

The description gives the essential input-output contract for a read-only helper with no output schema: the mapping result, the default size cap, and host constraint. It doesn't fully cover max_assets or error behaviors, but for a simple parameterized filter-and-bundle operation, agents have enough to invoke it correctly.

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 only 50% (file and image_refs have descriptions; max_bytes and max_assets do not). The description adds the default for max_bytes (250KB) and clarifies the imageRef return mapping, but does nothing to explain max_assets. The description partially compensates for the missing schema coverage, but max_assets semantics remain unclear.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the specific action and resource: it fetches image fills from GET /v1/files/{key}/images, downloads them, and returns a mapping of imageRef to metadata. It also clearly differentiates from siblings like get_image_fills by adding 'download each fill' and 'Not canvas mutation', so an agent can select the right tool without opening schemas.

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?

The description gives context ('Design-to-code helper'), a host restriction (Figma/S3 only), and a behavioral constraint (skips assets over max_bytes). However, it never names alternatives or gives an explicit 'use this when X' vs. 'use get_image_fills when Y', so the agent must infer the when-to conditions rather than being told.

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