Skip to main content
Glama

design_diff

Read-only

Diff a Figma node against its saved baseline to identify design changes and edit only affected code. First call saves the baseline; later calls show added, removed, or altered properties.

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?

Even with readOnlyHint=true, the description goes beyond by disclosing that the tool writes a baseline file under .figwright/snapshots/, never touches git, and never mutates Figma. It also transparently explains the update:true re-snapshot behavior and the default nodeId/rootDir behavior, providing a complete picture of side effects and state changes.

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 a dense single paragraph, but every sentence contributes: purpose, lifecycle, statuses, diff contents, update flag, defaults, file location, git behavior, and mutation guarantee. It could be slightly more scannable with bullets, but it is not padded or redundant.

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 no output schema, the description covers all necessary contextual information: status return strings, what changes are included, the update mechanism, path defaults, the baseline file's relationship to git, and that Figma is never mutated. This is complete enough for an agent to invoke the tool correctly without further probing.

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?

Despite 100% schema coverage, the description adds meaning beyond raw parameter names: nodeId defaults to selection and accepts pasted URLs, update:true means 'accept the changes' and re-snapshot, rootDir defaults to server cwd. These semantic details are not present in the schema and help the agent use the parameters correctly.

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 opens with a precise action: 'Diff a Figma node against a saved baseline of itself.' This clearly distinguishes it from sibling tools like get_design_context by focusing on change detection rather than full context retrieval. The scope is explicit (per-node, per-property) and the lifecycle (baseline-created vs diff) is stated.

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?

It gives a strong use case ('edit only the affected code instead of regenerating') and explains the first-call vs later-call behavior. However, it never explicitly names alternatives or states when not to use this tool; the guidance is implied rather than direct, so it stops short of a 5.

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