Skip to main content
Glama

find_element

Locates a web element using CSS, XPath, or other locator strategies and returns its text, tag, and attributes. Specify selector, strategy, and timeout to retrieve element details for browser automation.

Instructions

Find an element and return its text, tag, and attributes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
byNoLocator strategycss
timeoutNoWait timeout in seconds
selectorYesCSS selector, XPath, or other locator value

Schema Changelog

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

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden, but it only states the happy-path output. It does not disclose whether the tool waits up to timeout, what happens if no element matches, whether it returns the first match, or that it has no side effects.

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?

One tightly worded sentence names the action, scope, and return values with no redundancy. It is front-loaded and every word earns its place.

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?

For a simple single-element finder with full schema coverage, the description covers the core return values but leaves out failure behavior and return shape. Given no output schema or annotations, those omissions keep it at minimum viable rather than complete.

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 schema already documents by, timeout, and selector fully. The description adds no extra parameter-level meaning, so the baseline 3 applies.

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 ('Find') and resource ('an element') and states the exact return payload ('its text, tag, and attributes'). The singular 'an element' distinguishes it from sibling find_elements, and the combined return value separates it from get_text/get_attribute.

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

Usage Guidelines2/5

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

There is no guidance about when to choose find_element over its many element-related siblings (find_elements, get_text, get_attribute, wait_for_element). The return clause implies combined retrieval, but it never states the intended use case or exclusions, so the agent is left to infer selection criteria.

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/hakanngul/testfly-mcp'

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