Skip to main content
Glama

Get layout

get_layout

Retrieve interactive on-screen elements with center coordinates, plus off-screen items, and filter by search terms, element type, or screen point to inspect a React Native app's layout.

Instructions

Interactive on-screen elements with center coordinates. Elements scrolled out of view are listed separately as off-screen. Optional: filter with search terms (matched against text/testID), narrow by element type, or pass at:{x,y} to get the element at a point. source picks the capture path (js = app runtime, os = axe/uiautomator, default auto).

Input Schema

NameRequiredDescriptionDefault
atNo
typeNo
matchNo
deviceNo
searchNo
sourceNo
case_sensitiveNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does disclose useful behavior — center-coordinate semantics, that out-of-view elements are segregated as off-screen, and the default capture path. It says nothing about cost, permissions, freshness of the snapshot, or the shape of the returned data.

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?

Three dense sentences with the core result (elements + coordinates) front-loaded and the optional modifiers following. No filler, though the parenthetical enumerations compress a lot of meaning into semicolons.

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?

Missing.

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 0% with 7 parameters, so the description has to compensate and only partly does: it explains search (matched against text/testID), type, at:{x,y}, and source (js/os/auto with default). It leaves match, case_sensitive, and device undocumented, so three of seven parameters remain opaque.

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 verb and resource: retrieves interactive on-screen elements with their center coordinates, plus off-screen elements listed separately. Clear enough to know what you get back, but it never distinguishes itself from siblings like get_component_tree, read_screen_text, or observe, which an agent must choose between.

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?

Offers usage patterns for the optional modes (filter by search terms, narrow by type, point query via at:{x,y}) and explains the source default, so the agent knows how to use the parameters. It gives no guidance on when to prefer this over the sibling tree/state/text tools.

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