validate_selector
Check a selector before running an action to confirm it matches elements, see the match count and sample text, and get suggestions when ambiguous—preventing blind failures.
Instructions
[Agent Browser] Validate a selector before using it in an action. Use to check if a selector matches elements and how many, preventing blind failures. Returns match count, sample text, and suggestions for ambiguous selectors. Lightweight alternative to find_elements for quick validation.
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": {
"selector": "<selector>"
},
"name": "validate_selector"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selector | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| hints | No | ||
| message | No | ||
| success | No | ||
| suggestions | No |