Skip to main content
Glama

analyze_layout

Analyze screenshot layouts to identify assets, detect patterns, and calculate spatial relationships for semantic CSS reconstruction.

Instructions

Analyze the layout of assets in a screenshot. Finds all assets, identifies the center/hero element, calculates relative positions (angle and distance from center), and detects the layout pattern (radial, grid, or freeform). Returns structured data for rebuilding the layout with semantic CSS.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
screenshot_pathYesAbsolute path to the screenshot image file
asset_pathsYesList of absolute paths to asset images to find
thresholdNoMatch confidence threshold (0-1). Default 0.8
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes what the tool does (analysis tasks) and the output format ('structured data for rebuilding the layout with semantic CSS'), but lacks details on performance characteristics (e.g., processing time, error handling), resource requirements, or limitations (e.g., supported image formats, size constraints). It does not contradict any annotations, as none are given.

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?

The description is front-loaded with the core purpose and efficiently lists analysis steps in a single sentence, followed by the output use case. It avoids redundancy and each part adds value, though it could be slightly more concise by integrating the output mention with the analysis tasks.

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?

Given the tool's complexity (layout analysis with multiple outputs) and lack of annotations or output schema, the description is moderately complete. It covers the analysis tasks and output purpose but omits details on return structure, error conditions, or example outputs. Without an output schema, the agent must rely on the description's vague 'structured data' mention, which is insufficient for full understanding.

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 input schema fully documents parameters ('screenshot_path', 'asset_paths', 'threshold'). The description does not add any parameter-specific semantics beyond what the schema provides (e.g., it doesn't explain how 'threshold' affects layout detection or what formats 'asset_paths' should be in). The baseline score of 3 is appropriate as the schema handles parameter documentation adequately.

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 verbs ('analyze', 'finds', 'identifies', 'calculates', 'detects') and resources ('layout of assets in a screenshot'), distinguishing it from sibling tools like 'find_assets_in_screenshot' (which likely only locates assets) and 'get_screenshot_info' (which likely provides basic metadata). It explicitly lists the analysis outputs: finding all assets, identifying the center element, calculating relative positions, and detecting layout patterns.

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 description implies usage for analyzing asset layouts in screenshots to generate semantic CSS data, but it does not explicitly state when to use this tool versus alternatives like 'find_assets_in_screenshot' or 'get_screenshot_info'. No exclusions or prerequisites are mentioned, leaving the agent to infer context from the tool's name and description alone.

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/katlis/layout-detector-mcp'

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