layout-debug
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LD_DEVICE | No | Android device serial (adb -s) when more than one device is attached. | |
| LD_TARGET | No | Target platform: 'web' or 'android'. | web |
| LD_SERVER_URL | No | URL where the MCP process finds the main server. | http://127.0.0.1:5175 |
| LD_TARGET_URL | No | Page to inspect (web only). | bundled demo |
| LD_PROJECT_DIR | No | Repository directory that the built-in chat agent may edit; if unset, chat is disabled. | |
| LD_ANDROID_PORT | No | On-device agent port (Android only). | 8790 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| open_windowA | Start the layout-debug server if it is not running and open its window in the browser. The window shows the live UI (a web page or an Android device); the user selects elements, moves them and writes requests there. Returns the window URL and how to listen for the user's messages (wait_for_message). |
| wait_for_messageA | Wait until the user sends a message or an edit from the layout-debug window, then return it: the comment, the element (anchors for finding it in code) and the live-edit measurements. Returns before common tool timeouts; a timeout result is normal, call it again. Call open_window first. |
| layout_snapshotA | Tree of the latest snapshot of the live UI: nodes, sizes, anchors for finding them in code. Truncated by depth. |
| selected_elementB | What the user has selected in the layout-debug window right now: box, anchors for finding it in code, ancestor chain, live edits. |
| pending_requestsA | Edits the user sent from the layout-debug window that no agent has taken yet: comment + element facts + drag measurements. Each edit starts with its requestId. In listen mode use wait_for_message instead. Once you have handled an edit, report back via reply_in_window with that requestId: the user is watching the window, and the id marks that edit as done there. |
| reply_in_windowA | Write into the chat of the layout-debug window. Call it after handling a message from wait_for_message or pending_requests: the user is watching the window, and without this they will not know what you did. Keep it short: what you changed, in which files, what is left. If the edit could not be made, say why and pass status "error". Write in the same language as the user's comment. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 6 tools
Each tool has a distinct role, but wait_for_message and pending_requests both fetch user edits and could be momentarily confused, though the description clarifies they are listen-mode vs. poll-mode alternatives. layout_snapshot vs. selected_element are also related but distinguished by scope (full tree vs. current selection).
All names use snake_case, which is consistent, but the pattern mixes action verbs (open_window, wait_for_message, reply_in_window) with plain noun phrases for data getters (layout_snapshot, selected_element, pending_requests). Readable but two conventions coexist.
Six tools is well-scoped for a layout-debug workflow, with each tool earning a place: open, listen, inspect tree, inspect selection, drain pending edits, reply back.
The core lifecycle (open window, receive user edits, inspect the live UI, reply) is fully covered with no dead ends. A small gap is the absence of a close_window/shutdown tool and an explicit way to refresh the snapshot, but these are minor workarounds.