Skip to main content
Glama

Selected element

selected_element

Retrieve details for the UI element currently selected in the layout-debug window—bounding box, code anchors, ancestor chain, and live edits. Use these anchors to find and modify its source.

Instructions

What the user has selected in the layout-debug window right now: box, anchors for finding it in code, ancestor chain, live edits.

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations and no output schema, the description carries the full burden and does disclose the returned fields, which is genuinely useful. It omits the important edge case of what happens when nothing is selected, and whether this is a live subscription or a point-in-time read.

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?

A single dense sentence that front-loads the core answer ('what the user has selected') and then lists the payload. No filler or redundancy.

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?

For a zero-param reader with no output schema, describing the return payload is the right instinct and it is done well. However, the no-selection case and the freshness model of the data are left unspecified, which an agent needs to interpret an empty or stale result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so per the baseline there is nothing for the description to disambiguate. No schema burden is shifted onto the prose.

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?

The description names a specific resource and enumerates its payload (box, anchors, ancestor chain, live edits), so an agent knows exactly what comes back. It lacks an explicit verb (read/get) and never names or contrasts a sibling such as layout_snapshot, which is the nearest alternative.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no statement of when to call this versus layout_snapshot or the other window tools, and no prerequisites are given. The phrase 'right now' only hints that it reflects live state; the agent must infer the usage context entirely.

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