Skip to main content
Glama
jagadeshp

Playwright MCP

by jagadeshp

browser_find

Read-only

Find text or regex matches in the page's accessibility snapshot. Returns matching nodes with surrounding context, so a full snapshot capture is unnecessary.

Instructions

Search the accessibility snapshot of the current page for text or a regular expression. Returns matching snapshot nodes with a few lines of surrounding context (like search snippets), each shown under its path from the root of the tree, which is cheaper than capturing the whole snapshot when you only need to locate an element and its ref.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNoPlain text to search for in the page snapshot (case-insensitive substring match). Provide either text or regex, not both.
regexNoRegular expression to search for in the page snapshot. Matching is case-sensitive by default; wrap the pattern in slashes to add flags, e.g. "/error/i" for case-insensitive. Provide either text or regex, not both.
Behavior4/5

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

Annotations already cover readOnlyHint and destructiveHint. The description adds valuable behavior beyond that: it returns 'matching snapshot nodes with a few lines of surrounding context' and displays each under its 'path from the root of the tree.' No contradictions; the extra cost context is helpful.

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?

Two sentences, front-loaded with the primary action. Each clause adds value: search target, return format, path display, and cost benefit. No fluff or redundancy.

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?

Given moderate complexity and the lack of an output schema, the description adequately explains the return format (matching nodes with context) and the specific use case. It does not cover edge cases like no matches, but the cost comparison with browser_snapshot adds useful context that goes beyond the schema.

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 coverage is 100%, with each parameter fully described (case-insensitive substring, regex flags). The description only reinforces the 'either/or' requirement without adding deeper parameter syntax details, so baseline 3 is appropriate.

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 opens with a specific verb and resource: 'Search the accessibility snapshot... for text or a regular expression.' It also distinguishes from sibling browser_snapshot by noting it is 'cheaper than capturing the whole snapshot,' making the purpose unambiguous.

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 when to use this tool: 'when you only need to locate an element and its ref' and frames it as a cheaper alternative to capturing the whole snapshot, which implies browser_snapshot as the alternative. Also instructs to provide either text or regex, not both.

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/jagadeshp/Playwright-Mcp1'

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