Skip to main content
Glama
SJMakin

even-better-playwright-mcp

by SJMakin

browser_search_snapshot

Search browser snapshots using regex patterns to locate specific elements without reloading entire pages. This tool helps find matching lines in compressed DOM snapshots for efficient web automation.

Instructions

Search current snapshot with regex.

Requires: Call snapshot first. Returns: Matching lines with refs.

Options:

  • pattern: Regex pattern to search for

  • ignoreCase: Case-insensitive matching (default: false)

  • lineLimit: Max lines to return (default: 100)

Use this to find specific elements in large pages without re-reading the entire snapshot.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternYesRegex pattern to search for in the snapshot
ignoreCaseNoWhether to ignore case when matching
lineLimitNoMaximum number of lines to return (1-100)
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 does well by specifying prerequisites, return format ('Matching lines with refs'), and practical use case. It doesn't mention rate limits or error conditions, but covers key behavioral aspects like dependency on snapshot and output format.

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?

Well-structured with clear sections: purpose statement, requirements, returns, options list, and usage context. Every sentence adds value with no redundancy. The options section efficiently documents parameters without repeating schema details unnecessarily.

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 tool with no annotations and no output schema, the description provides good context about prerequisites, practical use case, and what to expect in returns. It could benefit from more detail about the 'refs' in return values or error handling, but covers the essentials well given the tool's complexity.

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 all parameters thoroughly. The description lists parameters with brief explanations but adds minimal value beyond what's in the schema. The baseline of 3 is appropriate since the schema does the heavy lifting.

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 searches a snapshot with regex, specifying both the action (search) and resource (current snapshot). It distinguishes from siblings like browser_execute or screenshot by focusing on text search within snapshots rather than execution or visual capture.

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?

Explicitly states 'Requires: Call snapshot first' as a prerequisite and provides context for when to use it ('to find specific elements in large pages without re-reading the entire snapshot'). This clearly differentiates it from tools like browser_network_requests or screenshot that serve different purposes.

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/SJMakin/even-better-playwright-mcp'

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