Skip to main content
Glama

get_design_context

Read-only

Retrieve a token-efficient node tree for design grounding. Provides structure, styling, text overrides, and design token resolution with optional component deduplication.

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 readOnlyHint=true; description confirms read-only behavior and discloses graceful degradation, deduped component behavior, and projectTokens annotation. No contradictions.

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?

Long but front-loaded with purpose and key guidance. Some redundancy (nodeId URL mention) and detailed edge-case expansions, but each sentence adds value for correct invocation.

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?

Despite no output schema, description thoroughly covers return behavior (sectionPlan, projectTokens, deduped overrides) and degradation paths, making the tool fully actionable.

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%; description adds defaults (depth unlimited, detail full, dedupeComponents true), explains detail level impacts, and clarifies nodeId accepts Figma URLs.

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?

Clearly states verb (Get), resource (node tree), and positions itself as the main design-grounding read, distinguishing from siblings like get_document/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 Guidelines5/5

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

Provides explicit when-to-use (prefer over get_document/get_node for large), when-to-use alternatives (detail:compact for cheap scan), and how to handle large trees (sectionPlan with per-section calls). Also mentions error condition (no nodeId/selection).

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