Skip to main content
Glama

playwright__browser_find

Read-only

Search the current page's accessibility snapshot for text or regex to locate elements and their refs, returning matching nodes with surrounding context and paths.

Instructions

[playwright] 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 declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds valuable behavioral detail about what is returned: matching snapshot nodes with surrounding context, a path from the root, and search-snippet-like formatting. This goes beyond the structured annotations.

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 with no filler. The core action is front-loaded, followed by return format, path context, and cost comparison. Every clause earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only search tool with fully described parameters and no output schema, the description sufficiently covers the return format and the practical reason to use it. An agent can determine inputs, expected output, and how this differs from the full snapshot without additional context.

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%, and the schema already documents text matching as case-insensitive substring, regex as case-sensitive by default with slash flags, and the 'provide either, not both' constraint. The description restates 'text or a regular expression' but adds no new parameter-level meaning beyond the schema.

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 starts with a specific verb and resource: 'Search the accessibility snapshot of the current page for text or a regular expression.' It clearly distinguishes itself from the sibling playwright__browser_snapshot by framing itself as a cheaper, targeted alternative for locating an element and its ref.

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

Usage Guidelines4/5

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

It explains when to prefer this tool: 'cheaper than capturing the whole snapshot when you only need to locate an element and its ref.' This gives clear usage context relative to the snapshot tool, though it does not name that sibling explicitly or state when not to use it in exclusionary terms.

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/danisluz/mcp-luz'

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