Skip to main content
Glama

design_diff

Read-only

Compare a Figma design node against a saved baseline to identify specific property changes—fills, layout, text, token bindings—then update the baseline as needed.

Instructions

Diff a Figma node against a saved baseline of itself, so after a design changes you edit only the affected code instead of regenerating. First call on a node saves a baseline (its get_design_context, full detail) under .figwright/snapshots/ and returns status 'baseline-created'; a later call returns status 'diff' with the per-node, per-property changes (added / removed / changed nodes; fills, layout/padding, text, token bindings — resolved to readable values, not opaque ids) or 'no-changes'. Pass update:true to accept the current design as the new baseline (re-snapshot). nodeId defaults to the selection; rootDir defaults to the server cwd. The baseline is a plain file the tool writes under the project — committing it (so teammates share the baseline) or gitignoring it is your call; the tool never changes git. It never mutates Figma. Scope by a component / section nodeId, the same unit codegen works on.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeIdNoNode to snapshot / diff (a pasted Figma URL also works); omit to use the selection
updateNoAfter diffing, overwrite the baseline with the current design (accept the changes)
rootDirNoProject root; defaults to the server cwd
Behavior5/5

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

The description fully discloses behavioral traits: it writes a baseline file locally, never mutates Figma, never changes git. It also explains the different status returns. This adds significant context beyond the readOnlyHint annotation, which it aligns with.

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 lengthy but well-structured. The first sentence introduces the purpose, followed by workflow, parameter details, and file behavior. While it could be slightly more concise, the complexity of the tool justifies the length.

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?

Given the tool's complexity (3 parameters, no output schema, lifecycle of baseline/diff), the description is remarkably complete. It covers the entire workflow, default behaviors, file system impact, and even advises on version control. No gaps remain.

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?

Schema coverage is 100% but the description adds meaningful context: nodeId defaults to selection, rootDir defaults to cwd, update:true overwrites the baseline. It also clarifies that nodeId can be a Figma URL. This goes beyond the basic schema 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 it diffs a Figma node against a saved baseline, with a specific use case: 'so after a design changes you edit only the affected code instead of regenerating.' This distinguishes it from siblings like get_design_context (which just retrieves context) and other mutation tools.

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 explains the two-phase workflow: first call creates a baseline, later calls return diffs. It also covers the update parameter for accepting changes. While it doesn't explicitly state when not to use or mention alternatives, the context is clear enough for an agent to decide when to invoke this tool.

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/awdr74100/figwright'

If you have feedback or need assistance with the MCP directory API, please join our Discord server