Skip to main content
Glama

ui_find_element

Locate a TradingView UI element by text, aria-label, or CSS selector to get its bounding box coordinates and visibility before clicking or hovering; read-only DOM query.

Instructions

Locate a UI element by text, aria-label, or CSS selector and return its bounding box coordinates and visibility. WHEN TO USE: Call to verify element existence and obtain coordinates before clicking or hovering. SIDE EFFECTS: None (Read-only DOM query). LIMITATIONS: Scans active DOM tree.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesText content, aria-label value, or CSS selector to search for
strategyNoSearch strategy (default: text)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does disclose the safety profile ('SIDE EFFECTS: None (Read-only DOM query)') plus a scope limitation ('Scans active DOM tree'). It stops short of covering failure behavior when an element is not found or any performance/rate considerations.

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?

Front-loads the action and return value, then tacks on labeled WHEN TO USE / SIDE EFFECTS / LIMITATIONS clauses. Every sentence earns its place with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description steps in to name the return values, and it covers safety and scope limitations for a two-parameter read tool. Minor gap: no mention of behavior when no element matches the query.

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 100%, so the query and strategy parameters plus the enum values are already documented. The description restates the three lookup strategies but adds no format syntax, matching precedence, or default behavior beyond the schema, so it meets the baseline only.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (Locate) and resource (UI element) plus the exact return payload (bounding box coordinates and visibility). This makes it clearly distinguishable from siblings like ui_click, ui_hover, and ui_evaluate, which act rather than locate.

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

Usage Guidelines4/5

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

The 'WHEN TO USE' clause explicitly positions it as a prerequisite for clicking or hovering, naming the alternatives. It does not state when-not to use it (e.g., deferring to ui_evaluate for scripted DOM queries), so it falls just short of an exhaustive routing rule.

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