Skip to main content
Glama

get_screen_layout

Retrieve layout details for all screen components to analyze positioning, dimensions, and visual structure in React Native apps. Use after get_component_tree to understand component relationships.

Instructions

Get layout information for all components on screen. USE AFTER get_component_tree: First use get_component_tree(structureOnly=true) to understand structure, then use this tool OR find_components with includeLayout=true to get layout details for specific areas. This tool returns full layout data which can be large for complex screens.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxDepthNoMaximum tree depth to traverse (default: 65, balanced for most screens)
componentsOnlyNoOnly show custom components, hide host components (View, Text, etc.)
shortPathNoShow only last 3 path segments instead of full path (default: true)
summaryNoReturn only component counts by name instead of full element list (default: false)
formatNoOutput format: 'json' or 'tonl' (default, pipe-delimited rows, ~40% smaller)tonl
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing important behavioral traits: the prerequisite relationship with get_component_tree, performance characteristics ('data which can be large for complex screens'), and alternative approaches. It doesn't cover all possible behavioral aspects like error conditions or authentication needs, but provides substantial operational context.

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?

The description is efficiently structured with three sentences that each serve distinct purposes: stating the core function, providing usage guidance, and warning about data size. There's no wasted text, and critical information is front-loaded.

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?

For a read-only tool with 5 well-documented parameters and no output schema, the description provides excellent context about when and how to use it, performance considerations, and alternatives. The main gap is the lack of output format details, but given the tool's relatively straightforward purpose and good parameter documentation, this 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 description coverage is 100%, so the schema already fully documents all 5 parameters. The description doesn't add any parameter-specific information beyond what's in the schema. This meets the baseline expectation when schema coverage is complete.

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 states the tool's purpose with specific verb ('Get') and resource ('layout information for all components on screen'). It distinguishes from sibling tools by specifying it returns 'full layout data' and contrasts with 'find_components with includeLayout=true' for specific areas.

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?

The description provides explicit usage guidance: 'USE AFTER get_component_tree' with specific parameter recommendation, and offers a clear alternative ('find_components with includeLayout=true'). It also warns about data size for complex screens, helping the agent decide when to use this tool.

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/igorzheludkov/metro-logs-mcp'

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