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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"screenshot_path": "<screenshot_path>",
"asset_paths": "<asset_paths>"
},
"name": "analyze_layout"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| screenshot_path | Yes | Absolute path to the screenshot image file | |
| asset_paths | Yes | List of absolute paths to asset images to find | |
| threshold | No | Match confidence threshold (0-1). Default 0.8 |