Skip to main content
Glama

get_search_html

Extract HTML content from web pages by searching with regex patterns to locate specific elements and retrieve surrounding context for browser automation testing.

Instructions

Search page HTML by regex pattern and return surrounding HTML context for matches.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regexYesRegular expression pattern to search for
indexNoOptional 0-based index of which match to return
tab_idNoOptional tab/window ID
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions searching and returning context but lacks critical behavioral details: what 'surrounding HTML context' means (character count, DOM structure), whether this operates on current page or saved HTML, error handling for invalid regex, or performance implications. The description is too vague for a tool that interacts with page content.

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 a single, efficient sentence that front-loads the core functionality. Every word earns its place—'Search page HTML by regex pattern' establishes the action, and 'return surrounding HTML context for matches' completes the purpose without redundancy.

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 3 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what 'surrounding HTML context' returns (structure, size limitations), error conditions, or how it differs from similar tools. Given the complexity of HTML searching and the lack of structured metadata, more behavioral context is needed.

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 parameters are well-documented in the schema itself. The description adds minimal value beyond the schema—it mentions 'regex pattern' and 'surrounding HTML context' which loosely relates to parameters but doesn't provide additional semantics like regex flavor, context size, or tab_id usage scenarios.

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's purpose with specific verbs ('Search', 'return') and resources ('page HTML', 'surrounding HTML context'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_page_html' or 'get_logs', which might also involve HTML/page content retrieval.

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?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'get_page_html' (which might fetch raw HTML) and 'get_logs' (which could contain HTML snippets), there's no indication of when regex-based HTML searching is preferred over other methods.

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/markmircea/Selenix-MCP-Server'

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