Skip to main content
Glama

get_design_context

Read-only

Fetch a token-efficient Figma node tree for design grounding. Choose detail levels, limit depth, and get component deduplication; large designs return as section plans.

Instructions

Get a depth-limited, token-efficient node tree — the main design-grounding read; prefer it over get_document / get_node for anything large. Starts from nodeId (a pasted Figma URL also works), else the current selection; errors when neither is available. detail: minimal (id/name/type) / compact (+ geometry) / full (+ styling, layout, text and design-system tokens resolved to names plus a deduped globalVars style table). Defaults to full with dedupeComponents true — the code-generation view; pass detail: compact explicitly for a cheap structure scan. An over-budget full result degrades gracefully: first to the compact structure of the same tree (note attached), then to a sectionPlan. depth limits child levels (omit or 0 = unlimited; cut nodes are flagged truncated). dedupeComponents collapses repeated instances of an already-expanded main component (flagged deduped); a deduped instance still carries textOverrides ({ name, characters } — the visible text it actually renders) and propertyOverrides (its per-instance visual diffs), so per-instance content survives without re-expanding the collapsed subtree. A tree too large to return whole comes back as a sectionPlan instead ({ sections: [{ nodeId, name, nodes, … }] } + a note): do not retry unscoped — call again per section nodeId at detail full and build section by section. On a full result, raw color values that exactly equal a project design token are annotated in projectTokens ({ '#6266F0': { ref, name, matchedBy: ['value'] } }, or { matchedBy, candidates: [...] } when several tokens share the value). matchedBy: ['value'] marks every entry as name-blind value-equality evidence — a hypothesis to verify, not a resolved binding: emit the ref only when the token fits the context semantically, keep the raw value otherwise, and let a bound Figma variable win over a raw-value match.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
depthNoMax child levels to include; omit or 0 for unlimited
detailNoHow much per-node data: minimal / compact / full (default)
nodeIdNoRoot node id (a pasted Figma URL also works); omit to use the selection
dedupeComponentsNoCollapse repeated instances of the same main component (default true)
Behavior5/5

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

Annotations only declare readOnlyHint=true, so the description carries the transparency burden. It discloses error behavior when neither nodeId nor selection is available, graceful degradation from full to compact to sectionPlan, dedupe semantics with flags and preserved overrides, and the hypothesis-based nature of projectTokens. This is far beyond what annotations provide.

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, front-loaded with the main purpose and containing no filler. However, the length and density could benefit from bullet points for scannability, especially the degradation and token-matching caveats. Every sentence earns its place, so no waste, but structure is a minor miss.

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 fully explains return shapes (sectionPlan, projectTokens, dedupe flags), error cases, and the over-budget degradation path. It also covers edge cases like multiple tokens sharing a value and how to verify matchedBy. This is comprehensive for a tool of this complexity.

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 operational depth: detail levels map to output shapes, depth=0 means unlimited with truncation flags, and dedupeComponents collapses subtrees while preserving textOverrides and propertyOverrides. For example, it explains that deduped instances still carry visible text, which is not inferable from the schema.

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?

Description states 'Get a depth-limited, token-efficient node tree' and positions it as 'the main design-grounding read', clearly distinguishing it from sibling tools like get_document and get_node. The verb 'get' plus the resource 'node tree' with scope qualifiers makes purpose unmistakable.

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?

Explicitly directs 'prefer it over get_document / get_node for anything large', and gives specific tactical guidance: 'pass detail: compact explicitly for a cheap structure scan' and warns 'do not retry unscoped — call again per section nodeId'. This is strong when/when-not guidance with named alternatives.

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