Skip to main content
Glama

Inspect screen

inspect_screen

Lists screen elements with locators verified to match exactly one element, ordered by stability, using a saved page source or live device for Python or Java tests.

Instructions

List a screen's elements with locators verified to match exactly one element, most stable first (accessibility id, resource id, text, XPath). screen: a saved page source XML in the project; omit to read the live device. lang: python (default) or java, for how locators are written.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "inspect_screen"
  }
}

Input Schema

NameRequiredDescriptionDefault
langNo
screenNo
max_elementsNo
interactive_onlyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. It does disclose the uniqueness guarantee and stability ordering, but omits two behaviorally significant defaults that are visible only in the schema: interactive_only=true filters out non-interactive elements by default, and max_elements=60 truncates results — an agent may wrongly assume it is seeing every element. Read-only nature and live-device interaction cost are only implied.

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?

Front-loaded with the outcome (elements with verified-unique locators, stable-first), then parameter notes. Dense without filler; the nested parentheticals cost a little readability but every clause conveys real information.

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 an inspection tool with no output schema, the description usefully characterizes what comes back (elements with locators, ordered by stability), so return-value explanation is adequate. It is incomplete for a 4-parameter tool, though: filtering and truncation behavior that materially shapes the result set goes unmentioned.

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 0%, so the description must compensate. It does well for screen (\"a saved page source XML in the project; omit to read the live device\") and lang (\"python (default) or java, for how locators are written\"), but never mentions max_elements or interactive_only, leaving half the parameters with no semantics anywhere.

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?

States a specific verb and resource ("List a screen's elements") and adds distinguishing qualifiers: locators verified to match exactly one element, ordered most-stable-first with the tier order spelled out. It does not explicitly contrast with siblings like check_locator or save_screen, so it sits just below the top.

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 explains a usage branch for one parameter (omit screen to read the live device, supply it to use a saved page source) and the lang default. It gives no guidance on when this tool is preferred over check_locator, heal_locator, or capture_baseline, so tool selection is left to inference.

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