Skip to main content
Glama

read_structure

Read-only

Retrieve a bounded layer tree for a Figma node with sizes, auto layout, fills, strokes, radius, text styles, and component names; hidden layers are skipped.

Instructions

Layer tree of a node for implementing it: one line per layer with size, auto layout, fills, strokes, radius, text style and component. Hidden layers skipped. Bounded by depth and node count.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "file": "<file>",
      "id": "<id>"
    },
    "name": "read_structure"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesNode id or node URL
fileYesFigma file URL or key
depthNoLevels below the node (default 4)
offsetNoFrom a [more: …] footer
maxNodesNoStop after this many lines (default 150)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the description's job is to add context, which it does: hidden layers are skipped, and the result is bounded by depth and node count, so the agent knows output can be truncated. It does not say how truncation is signalled in the payload, leaving a small gap.

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, both front-loaded and information-dense: the first defines the output shape, the second defines the limits applied to it. Nothing is redundant with the title or the schema.

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

Completeness4/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 carries the return-format burden and does so by describing the one-line-per-layer layout and its fields, plus truncation behavior. Only the lack of explicit sibling routing keeps it from full completeness.

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?

Schema coverage is 100%, so all five parameters are already documented in the schema, and the 3 baseline applies. The description reinforces that depth and maxNodes act as bounds on the returned tree, but adds no format or interaction detail beyond that.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb-resource pairing ("Layer tree of a node") plus an enumeration of exactly what each output line contains (size, auto layout, fills, strokes, radius, text style, component). It clearly differs in shape from siblings like read_outline or read_frame_text, but never names an alternative, so the agent must infer the boundary.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

The phrase "for implementing it" implies the use case — you need the layer tree to rebuild the design — but there is no explicit when-to-use versus when-not, and no routing to related readers such as read_outline or read_search.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.