Skip to main content
Glama
playwright-mcp-router

playwright-mcp-router

by huangzt

browser_find

Read-only

Search the current page's accessibility snapshot for text or a regular expression and return matching nodes with surrounding context and refs, avoiding the need to capture the full snapshot.

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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "session": "<session>"
    },
    "name": "browser_find"
  }
}

Input Schema

NameRequiredDescriptionDefault
textNoPlain text to search for in the page snapshot (case-insensitive substring match). Provide either text or regex, not both.
colorNoOptional Chrome tab group color override for a newly created session.
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.
accountNoChrome account profile to use (defaults to 'default'). Configured accounts: 'default' (Isolated Browser).default
sessionYesRequired isolated session name (also displayed as the Chrome tab group title), e.g. "T1867-api-debug" or "home-css". Use a unique, descriptive task name per conversation so concurrent agents never hijack each other's active tab.
filenameNoSave results to a file instead of returning them in the response. Relative file names are resolved against the workspace root.
maxResultsNoMaximum number of matching items to return. Defaults to returning all matches.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=true, so the safety profile is covered. The description adds real behavioral value beyond that: results are matching snapshot nodes with surrounding context, presented under their path from the root, plus a cost comparison with full snapshot capture. It does not mention the file-saving or result-capping behavior, but those are documented in the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the action and resource, then the return shape, then the cost rationale. Efficient overall, though the parenthetical '(like search snippets)' is soft padding relative to the sharper material around it.

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 7-parameter read tool with no output schema, the description adequately conveys what comes back (matching nodes with context and tree paths) and why to choose it over full snapshot capture. The remaining parameter-level details are fully covered by the schema, so nothing critical to correct invocation is missing.

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 text, regex, session, filename, maxResults, color, and account precisely. The description mentions only that it searches for text or a regex, adding no syntax or format detail beyond the schema's own notes about case-insensitivity and slash-delimited flags. 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?

States a specific verb and resource: 'Search the accessibility snapshot of the current page for text or a regular expression.' It also implicitly differentiates from the broader browser_snapshot by explaining it is 'cheaper than capturing the whole snapshot when you only need to locate 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?

Clear conditions for use: when you only need to locate an element and its ref, rather than capturing the full snapshot. It stops short of naming browser_snapshot explicitly or stating when-not-to-use, so the routing signal is implied rather than prescriptive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.