Skip to main content
Glama

find_element

Search DOM elements in pywebview UIs by CSS selector, tag, HTML ID, ARIA role, text, or visibility for precise interaction and debugging.

Instructions

Search DOM elements by CSS selector, tag, html id, ARIA role, text, or visibility. Examples: find_element(selector="#launch-btn") find_element(text="Launch") find_element(role="button")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagNo
roleNo
textNo
html_idNo
visibleNo
selectorNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

With no annotations, the description carries the burden of disclosing behavior. 'Search DOM elements' implies a read-only operation, but it does not state whether it returns a single element or list, what happens if no match is found, or whether it has side effects. The examples are illustrative but do not clarify behavioral details.

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 concise and well-structured, with the core search criteria in the first line and three illustrative examples. Every sentence adds value and there is no redundant text.

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

Completeness2/5

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

For a tool with six optional parameters and no annotations, the description is incomplete. It does not cover return values, error handling, parameter combinations, or how this tool fits into the broader workflow with siblings like click or get_element_info. The examples are helpful but not sufficient for full contextual understanding.

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?

The description lists all parameter categories and provides examples for selector, text, and role, which adds practical meaning beyond the raw schema. However, it does not explain the 'visible' parameter, combination rules, or value formats for all parameters, leaving gaps.

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 clearly states the tool searches DOM elements by multiple criteria (CSS selector, tag, id, role, text, visibility), which is specific and understandable. It does not explicitly differentiate from sibling tools like get_dom_tree or get_element_info, but the scope is clear enough for basic selection.

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 examples show how to use the tool with different parameters, implying usage scenarios, but there is no explicit guidance on when to use this tool versus alternatives or when not to use it. It lacks context about combining parameters or fallback behavior.

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

Install Server

Other Tools

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/pywebview-mcp'

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