Skip to main content
Glama

browser_search

Find web page elements using text, regex, roles, or CSS selectors to target specific content for interaction.

Instructions

Grep-like element search across the current page. by: 'text' (literal substring), 'regex', 'role', 'ariaLabel', 'selector' (CSS). Returns results[] sorted by confidence descending — pass results[0].selector to browser_click_element. Pagination via offset/maxResults. Caveats: Use browser_get_interactive for broad discovery; use browser_search when you know specific text or role to target.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
byYesSearch axis: text/regex/role/ariaLabel/selector
patternYesPattern to match against the chosen axis.
scopeNoCSS selector to limit the search scope.
maxResultsNoMax results returned (default 50).
offsetNoOffset into the result set (default 0).
visibleOnlyNoOnly visible elements (default true). Set false to include hidden ones with confidence penalty.
inViewportOnlyNoOnly currently-in-viewport elements (default false).
caseSensitiveNoCase-sensitive matching for text/regex (default false).
tabIdNoTab ID from browser_connect. Omit to use the first page tab.
portNoChrome/Edge CDP remote debugging port.
Behavior4/5

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

With no annotations provided, the description carries full burden and adds valuable behavioral context: returns results sorted by confidence descending, pagination via offset/maxResults, and caveats about confidence penalties for hidden elements. It doesn't fully cover all behavioral aspects like error conditions or performance characteristics, but provides substantial operational guidance.

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?

Three tightly packed sentences with zero waste. First sentence defines purpose and parameters, second explains output and integration with browser_click_element, third provides clear usage guidelines. Every sentence earns its place.

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?

For a complex 10-parameter tool with no annotations and no output schema, the description provides good context about when to use it, how results are structured, and integration with other tools. It could benefit from more detail about the confidence scoring algorithm or result format, but covers the essential operational context well.

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 baseline is 3. The description mentions the 'by' parameter values and hints at 'offset/maxResults' for pagination, but doesn't add significant semantic value beyond what's already documented in the comprehensive schema descriptions.

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 clearly states the tool performs 'Grep-like element search across the current page' with specific search axes listed. It distinguishes from sibling browser_get_interactive by specifying 'when you know specific text or role to target' versus 'broad discovery'.

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

Usage Guidelines5/5

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

Explicit guidance is provided: 'Use browser_get_interactive for broad discovery; use browser_search when you know specific text or role to target.' This clearly differentiates when to use this tool versus a specific sibling alternative.

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/Harusame64/desktop-touch-mcp'

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