Skip to main content
Glama

find_widget

Locate widgets in a running PySide6 app by class name, object name, text, or visibility to get their IDs for targeted UI automation.

Instructions

Search for widgets by class, objectName, text content, or visibility. Returns a list of matching widgets with their IDs. Examples: find_widget(class_name="QPushButton") find_widget(text="Apply Mods") find_widget(object_name="enabledCheckBox")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pidNoApp pid from launch_app. Omit to target the last launched app. Required only when several apps are running and you need a specific one.
textNo
visibleNo
class_nameNo
object_nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It states that the tool is a read-only search returning a list of widget IDs, which is useful. It does not disclose edge behaviors such as what happens when no filters are supplied or whether the search spans the whole app tree, but it is not misleading.

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?

The description is compact: a one-sentence purpose, a one-sentence return behavior, and three concrete usage examples. Every line earns its place and the examples make invocation unambiguous.

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?

The tool is simple and an output schema exists, so the description does not need to detail return fields. Still, it does not explain behavior with no criteria or how multiple criteria are combined, and the absence of annotations means these gaps fall on the description.

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 coverage is only 20%, but the description names the searchable criteria (class, objectName, text, visibility), which adds meaning to four parameters that lack schema descriptions. It does not explain how parameters combine (AND/OR) or clarify the pid parameter, so compensation is only partial.

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?

The description uses a specific verb ('Search') and resource ('widgets') and names the filter criteria. It distinguishes itself from siblings like get_widget_tree and get_widget_info by clarifying it returns a list of matching widget IDs, which is a concrete and different outcome.

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: use this tool when you need to locate widgets by class, text, object name, or visibility. However, there is no explicit guidance about when to prefer this over get_widget_tree or get_widget_info, nor any exclusions or alternatives.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/com55/pyside6-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server