Skip to main content
Glama
LeoGCode

figma-reader-mcp

by LeoGCode

figma_export_image_fills

Export image assets used in Figma fills and strokes to a local directory. Returns each image's hash, path, size, and the layers using it, while flagging missing images without writing them.

Instructions

Write the original image assets (photos, bitmaps) a node or the whole file uses, in a fill or a stroke paint, to a directory. Answers with an array, one entry per distinct image: hash, the path written, its size in bytes, and up to five of the layers using it (with usedByTotal when there are more). An image whose bytes this export does not carry is reported as {hash, missing: true} and nothing is written for it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesPath to a local .fig file, or a Figma file key / figma.com/design/... URL. A node-id in the URL is used when this tool takes node_id and it is omitted; a tool that answers about the whole file ignores it. A key or URL uses a local '<name> [<key>].fig' from FIGMA_FILES_DIRS when one exists, otherwise exports through the browser.
node_idNo
out_dirYesDirectory to write the images into, created if it is missing. A relative path is resolved against this process's working directory, which for an MCP server is wherever the client started it
refreshNoSkip local/cached copies and export the live file through the browser. Has no effect when file is a path to a .fig: that file is read as it is on disk and the result carries refreshIgnored; pass the key or URL to export the live file instead.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

The description discloses concrete side effects: it writes files to a directory, creates the directory if missing, resolves relative paths against the process working directory, reports missing images, and explains refreshIgnored behavior. This goes well beyond the annotations and is consistent with readOnlyHint=false, since the tool writes to the local filesystem.

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?

The description is dense but well-structured, front-loading the core action and then detailing output, missing-image behavior, and file resolution semantics. Every sentence adds value, though the file semantics could be slightly tighter without losing important detail.

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

Completeness5/5

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

With no output schema, the description compensates by specifying the exact array shape, per-image fields, missing-image reporting, and layer usage information. It also covers file source resolution, refresh behavior, and directory creation, giving an agent nearly everything needed to call the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds substantial semantics beyond the schema for file (path/key/URL forms and node-id in URL), out_dir (creation and relative path resolution), and refresh (ignored for local .fig files). However, node_id itself is only indirectly mentioned and its expected format is not fully specified, leaving a small gap.

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 a specific verb and resource: "Write the original image assets ... to a directory" for a node or the whole file. It clarifies the domain (image fills and stroke paints) and describes the return format, making it easily distinguishable from sibling tools like figma_screenshot or figma_get_node.

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

Usage Guidelines4/5

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

The description gives clear context for when the tool is appropriate: it can target a node or the whole file, accepts a local .fig path, a file key, or a URL, and explains refresh behavior. It does not explicitly name alternatives or say when not to use it, but the usage context is strong enough for an agent to make a reasonable selection.

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