Skip to main content
Glama
Figma Local Bridge

Figma Local Bridge

by Miart

figma_get_layout_tree

Capture a Figma subtree's absolute-geometry snapshot in one call—parent, size, transform, layout/render bounds, and clip flags—to validate rebuilds or atlases without per-layer queries.

Instructions

Absolute-geometry snapshot of a subtree in ONE call: per node — parent, size, absoluteTransform (2x3 matrix), absolute layout and render bounds, clip flag. Measured in document-absolute space, the same space a PNG export uses, so it is what you check a rebuild or an atlas against instead of one get_node per layer. The screenshot is a SEPARATE call (atomicWithScreenshot: false): geometry first, then capture, and compare rev.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "figma_get_layout_tree"
  }
}

Input Schema

NameRequiredDescriptionDefault
nodeIdNoScene node to snapshot; defaults to the single selected node
fileKeyNoWhich connected Figma file to use: its fileKey (figma_whoami) or, when omitted, the only connected file. Required once more than one file is connected; figma_ping lists them.
maxNodesNoTruncation budget; `truncated` says when it was hit

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.36.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and largely meets it: it discloses the returned per-node fields, the coordinate space (document-absolute, matching PNG export), and the truncation signal ('truncated' says when the budget was hit). What it omits is the read-only/safety framing, permission or selection requirements, and error behavior when a nodeId is invalid — reasonable but not exhaustive for a tool with zero annotation coverage.

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?

Two dense sentences, front-loaded with the payload contract before the usage rationale; almost every clause carries information. Minor cost comes from typographic emphasis and jargon ('ONE call', 'SEPARATE call', `atomicWithScreenshot`) that a plain phrasing would convey as well.

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?

There is no output schema and no annotations, so the description must state what comes back — and it does, listing the per-node geometry fields, the coordinate space, and the truncation indicator. Given a 3-parameter read tool with fully-described params, the remaining gap is failure/error behavior and selection prerequisites, which is minor.

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 nodeId, fileKey and maxNodes are already fully documented, which sets the baseline at 3. The description adds useful framing — that measurements are in document-absolute space — and references `rev` for cross-call comparison, but it introduces `atomicWithScreenshot: false`, a flag that does not appear in the input schema, which adds ambiguity rather than meaning for the declared parameters.

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?

Opens with a specific verb+resource+scope: 'Absolute-geometry snapshot of a subtree in ONE call', then enumerates exactly what each node carries (parent, size, absoluteTransform 2x3 matrix, layout/render bounds, clip flag). It explicitly contrasts with the per-layer alternative ('instead of one get_node per layer'), so an agent can distinguish it from siblings like figma_get_metadata or figma_inspect before reading any schema.

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?

States the use case concretely ('what you check a rebuild or an atlas against') and names the alternative it replaces (per-node get_node calls). It also explicitly excludes the adjacent capture step by declaring the screenshot a SEPARATE call and prescribing the order: 'geometry first, then capture, and compare `rev`.'

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