Skip to main content
Glama

Check selectors still match

verify_selectors
Read-only

Checks a list of CSS or XPath selectors against the current page and reports match counts, helping you detect rotted selectors after UI changes before a test run.

Instructions

Takes a list of selectors and reports, for each, how many elements it matches on the page now. Use it to find selectors that have rotted after a UI change, before a test run does.

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": {
      "selectors": "<selectors>"
    },
    "name": "verify_selectors"
  }
}

Input Schema

NameRequiredDescriptionDefault
selectorsYesCSS or XPath selectors to check.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.3

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered elsewhere. The description usefully adds that matching happens against the live page state right now and returns a count per selector. It omits what happens with malformed selectors (error vs zero matches) and any note on cost when checking up to 200 selectors.

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, zero filler, with the core behavior front-loaded and the motivating scenario second. Nothing could be removed without losing information.

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

Completeness3/5

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

For a one-parameter tool with no output schema, the description conveys the return shape (a match count per selector) and the page context. The notable gap is error semantics for invalid or rotted selectors, which matters precisely because the tool is meant to distinguish broken selectors from absent elements.

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 single parameter is fully documented as an array of CSS or XPath selectors. The description restates that it is a list of selectors and clarifies the per-item output meaning (one match count each), but adds no syntax or format detail beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a concrete verb and resource: it takes selectors and reports per-selector match counts on the current page. That is enough to separate it from capture/inspect siblings, though it never names an alternative explicitly.

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 states a clear use case — detecting selectors that broke after a UI change, before a test run fails — which tells the agent when to reach for it. It stops short of naming alternatives such as collect_selectors or explaining when not to use it.

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