Skip to main content
Glama

browser_locator_validate

Validates browser selector stability by counting matches and visible elements, then provides scores, risks, and suggestions across multiple locator strategies.

Instructions

验证选择器稳定性,统计匹配数量、可见数量,并按 role/label/placeholder/data-testid/text/id/css/xpath 等规则输出分数、风险、警告和建议。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYes要验证的 Playwright/CSS/text/role 选择器
sessionNameNo浏览器会话名称
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses that the tool counts matches and visibility, and outputs scores, risks, warnings, and suggestions by rule type. However, it does not state whether the tool is read-only, if it requires a specific page state, whether it modifies browser state, or any error conditions. Basic behavioral traits are provided but not comprehensively.

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?

The description is a single sentence that covers the essential purpose and output, but it is somewhat dense and could be more structured (e.g., separate sentences for purpose, input, output). It is efficient but not optimally front-loaded for quick scanning.

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?

The tool has no output schema, so the description should explain return values in detail. It mentions scores, risks, warnings, and suggestions but does not specify their format, possible values, or how to interpret them. It also lacks information on error handling, prerequisites (e.g., page must be loaded with the element), or side effects. For a validation tool, this is insufficiently complete.

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%, and the description adds no additional meaning beyond what the schema already provides for the two parameters ('selector' and 'sessionName'). The schema descriptions are already informative ('要验证的 Playwright/CSS/text/role 选择器'). Baseline 3 is appropriate as the description does not need to compensate.

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's purpose: validating selector stability. It specifies the verb '验证' (validate) and the resource '选择器' (selector), and details what statistics and outputs are computed (counts, scores, risks, warnings, suggestions) with explicit reference to rule types (role, label, etc.). This distinguishes it from sibling tools like browser_locator (find locators) and browser_locator_suggest (suggest locators).

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

Usage Guidelines3/5

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

The description implies when to use the tool (to validate selector stability) but does not explicitly state when to use it over alternatives like browser_locator or browser_locator_suggest. No when-not-to-use or prerequisite information is provided. The usage context is inferred rather than explicitly guided.

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/validpilot/ai-verify-mcp'

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