Skip to main content
Glama

Render a node to an image

fig_render

Render any frame, component, shape, text, or page from a local .fig file to PNG or SVG for visual inspection, fully offline.

Instructions

Render a node — frame, component, instance, group, shape, text, or a whole page — to a PNG the model can look at, or to SVG. Fully offline: geometry, text outlines and images all come from the file. Rendering is best-effort: read approximated and unsupported in the report before trusting fine details; exact values remain available from fig_node / fig_style / fig_text. Default output is PNG at 2x, capped to 1568 px on the longest edge; use savePath to write a file instead of inlining it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesPath to the .fig / .figma file (absolute, or relative to the server CWD).
guidYesNode to render, e.g. "2:1339". A page guid renders the whole page, downscaled to fit maxSize.
scaleNoDevice scale factor. Default 2. Lowered automatically to respect maxSize.
formatNoDefault "png". Falls back to SVG text when the optional rasterizer is not installed.
maxSizeNoLongest edge in pixels. Default 1568.
maxNodesNoRefuse subtrees larger than this. Default 20000.
savePathNoWrite the PNG/SVG to this path (directories are created) instead of inlining it. Required when the PNG exceeds 2097152 bytes or the SVG exceeds 50000 characters.
backgroundNoDefault "transparent". "page" fills with the page background colour.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A5/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint false, etc.), the description discloses key behaviors: best-effort rendering with approximation/unsupported flags, fallback to SVG text when the rasterizer is missing, automatic scale lowering to respect maxSize, refusal of subtrees over maxNodes, and directory creation with savePath. These are not captured by structured annotations.

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?

A single dense paragraph is front-loaded with the core purpose, then limitations, then defaults and parameter-specific nuances. Every sentence adds operational value without redundancy, and the structure is easy to scan.

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?

For a tool with 8 parameters and no output schema, this description covers all parameters' defaults, constraints, fallbacks, and output modality (inline vs saved file). It also explains the report's role (approximated/unsupported) and points to alternative tools for exact values, giving an agent everything needed to invoke it correctly.

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

Parameters5/5

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

Schema coverage is 100%, but the description adds deep meaning: defaults for scale (2), maxSize (1568), and background (transparent); the condition for savePath (required when PNG > 2097152 bytes or SVG > 50000 chars); and the behavior that a page guid downscales to fit maxSize. This goes well beyond the schema's per-parameter descriptions.

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 clearly states a specific verb ('Render') and resource ('a node') with explicit node types (frame, component, instance, group, shape, text, or whole page) and output formats (PNG or SVG). It also distinguishes from siblings by noting the offline nature and that this is for visual inspection.

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

Usage Guidelines5/5

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

The description explicitly says 'Rendering is best-effort: read `approximated` and `unsupported` in the report before trusting fine details; exact values remain available from fig_node / fig_style / fig_text.' This names alternative tools and the exact condition under which to prefer them. It also clarifies when to use savePath (when output exceeds size limits) versus inline return.

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