Skip to main content
Glama

get_design_context

Destructive

Extract depth-limited design trees from Figma selections or pages as a token-efficient alternative for large files. Configure traversal depth, detail level, and component deduplication to optimize context retrieval.

Instructions

Get a depth-limited tree of the current selection or page. More token-efficient than get_document for large files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dedupe_componentsNoWhen true, INSTANCE nodes are serialized compactly (mainComponentId + componentProperties + overrides array of differing text/nested content) and unique component definitions are collected once in a top-level componentDefs map. Highly token-efficient for screens with many repeated component instances.
depthNoHow many levels deep to traverse (default 2)
detailNoProperty verbosity: minimal (id/name/type/bounds only), compact (+fills/strokes/opacity), full (everything, default)
Behavior1/5

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

The description uses 'Get' implying a read-only operation, which directly contradicts the annotations indicating destructiveHint=true and readOnlyHint=false. It fails to explain why a retrieval operation would be destructive or what side effects occur.

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?

Two sentences efficiently convey purpose and comparative advantage without redundancy. The information is front-loaded with the core action in the first sentence.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the destructive annotation and lack of output schema, the description inadequately explains behavioral outcomes or return structure. It mentions returning a 'tree' but omits critical safety warnings about the destructive nature implied by annotations.

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

Parameters3/5

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

With 100% schema coverage, the description appropriately does not redundantly document parameters. It adds value by contextualizing the 'depth' parameter through the 'depth-limited' phrasing and explaining the token-efficiency implications of the deduplication feature.

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 defines the operation as retrieving a 'depth-limited tree' and explicitly differentiates from sibling tool 'get_document' by highlighting token efficiency for large files.

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 provides explicit comparison to 'get_document' indicating when to prefer this tool (large files), but lacks guidance regarding other sibling retrieval tools like 'get_node' or 'get_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/vkhanhqui/figma-mcp-go'

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