Skip to main content
Glama

resolve_elements

Finds UI elements by walking the uia → cdp → vision backend chain and returns the first non-empty element set, the tier that answered, and why earlier tiers fell through. Read-only.

Instructions

Walk the structured-first backend chain (uia -> cdp -> vision) and return the first non-empty element set, which tier answered, and why the earlier tiers fell through. Read-only.

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": "resolve_elements"
  }
}

Input Schema

NameRequiredDescriptionDefault
hwndNonative window handle; enables the uia tier
portNoCDP port; 0 skips the cdp tier
origin_xNowindow top-left inside the image, X; subtracted to reach window-relative coords
origin_yNowindow top-left inside the image, Y; subtracted to reach window-relative coords
max_resultsNo
url_containsNo
detections_pathNoscreen-parsing detection JSON; enables the vision tier

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden; it does useful work by declaring 'Read-only' and by disclosing the return shape (element set, answering tier, fall-through reasons). It omits practical behavior an agent would want: that the vision tier is likely the expensive/slow path, whether failures across all tiers are errors or empty results, and whether anything is mutated on disk during fallback.

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?

Two tight sentences, front-loaded with the core mechanism before the return information, and the trailing 'Read-only.' is a deliberate safety flag rather than filler. The arrow notation is compact and readable; no sentence is wasted.

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?

With seven optional parameters and no output schema, the description does well to explain the return payload, since nothing else does. It is still incomplete for a multi-tier tool: it does not say what happens when all tiers fail, nor which parameter combinations are meaningful, forcing the agent to reconstruct the tier prerequisites from the schema alone.

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?

Schema coverage is 71%, with tier-enabling semantics already documented per-parameter (hwnd enables uia, port=0 skips cdp, detections_path enables vision). The description reinforces this by framing the parameters as tier switches, which clarifies intent, though the two undescribed parameters (max_results, url_contains) get no additional meaning from the description.

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 mechanism (structured-first chain uia -> cdp -> vision) and a specific outcome (first non-empty element set plus which tier answered), which is far more than a restatement of the name. It stops short of 5 because it never contrasts itself against likely siblings such as detect_elements or vision_detect, so the agent must infer the distinction.

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?

Usage is implied by the fallback chain: this tool is for resolving elements when you want tiered structured-first resolution. However, there is no explicit when-to-use versus when-not-to-use statement, no mention of cost/latency tradeoffs of falling through to vision, and no guidance on which parameters are needed to reach which tier beyond what the schema already says.

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