Skip to main content
Glama

Layout tree

layout_snapshot

Captures a depth-limited tree snapshot of the live UI, listing nodes, sizes, and code anchors so you can locate elements for layout debugging.

Instructions

Tree of the latest snapshot of the live UI: nodes, sizes, anchors for finding them in code. Truncated by depth.

Input Schema

NameRequiredDescriptionDefault
maxDepthNoTree depth

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does disclose two real behavioral traits: the data is from the latest snapshot of the *live* UI (not historical), and the result is depth-truncated. It does not state that the operation is read-only, whether the snapshot is cached/stale, or what happens at the truncation boundary.

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 tight fragments with no filler, front-loaded with the return content before the truncation caveat. The telegraphic style leaves a few things implicit but nothing is redundant.

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

Completeness3/5

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

With no output schema, no annotations, and a single optional parameter, the description is the only source of information — and it only sketches the returned structure. It conveys the shape (nodes, sizes, anchors) and the truncation rule, but leaves the node/return format largely unstated for a tool whose entire value is its return data.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds meaning beyond the schema's terse 'Tree depth' by stating that results are 'truncated by depth' — clarifying what the maxDepth parameter actually controls. It does not give guidance on choosing a value or the cost of deeper trees.

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?

States a specific resource and scope: the layout tree of the latest snapshot of the live UI, listing nodes, sizes and anchors. An agent can distinguish it from siblings like selected_element or pending_requests, though no sibling is named explicitly. Clear but not differentiated by contrast.

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?

'anchors for finding them in code' implies the intended use case (locating UI elements in source), which is useful implied guidance. However, there is no explicit statement of when to call this vs. selected_element or how it relates to the other inspector tools, and no prerequisites or exclusions.

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