qt_find_widget
Search a running Qt app's widget tree by fuzzy text, class, object name, or semantic description to locate labels, buttons, and fields. Results are ranked and registered as refs usable by click and type tools.
Instructions
Search the widget tree for widgets matching criteria. Prefer over qt_snapshot.
Two modes. With describe and/or window_title it is a semantic search: describe
is matched fuzzily (typos, punctuation and case ignored) against label/button text,
group and dock titles, tooltip, what's-this, status tip, accessible name/description,
objectName, placeholder, tab titles, dynamic properties, class name and style sheet;
results are ranked with the reason each matched. Otherwise the plain substring filters
below apply.
Registers found widgets in the ref registry — returned refs are immediately usable with qt_click, qt_type, qt_get_text, etc.
Args:
pattern: Case-insensitive substring matched against class name, objectName,
or text content (OR logic across fields).
class_name: Exact class name, case-insensitive (e.g. 'QLineEdit', 'QPushButton',
'ControlWidget'). Must match the full class name, not a substring.
object_name: Substring match on objectName.
text: Substring match on widget text/label content.
root_ref: Restrict search to subtree of this widget.
visible_only: Only return visible widgets (default True).
max_results: Cap on results returned (default 20).
describe: Free-text description, e.g. 'Name goes here:' or 'save the profile'.
window_title: Fuzzy match on the top-level window title (e.g. 'PIPE-1234').
search_fields: Limit describe to some of: text, title, placeholder, tooltip,
whats_this, status_tip, accessible_name, accessible_description, object_name,
window_title, tab_text, properties, class_name, style_sheet.
min_score: Minimum semantic match score 0-1 (default 0.5).
At least one of pattern, class_name, object_name, text, describe or window_title must be provided.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | ||
| pattern | No | ||
| describe | No | ||
| instance | No | ||
| root_ref | No | ||
| min_score | No | ||
| class_name | No | ||
| max_results | No | ||
| object_name | No | ||
| visible_only | No | ||
| window_title | No | ||
| search_fields | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |