Read values with JavaScript
browser_queryExtract only the page values you need—prices, counts, titles, or result lists—using a read-only JavaScript expression that returns JSON, avoiding full-page text or snapshots.
Instructions
Read just the values you need (prices, counts, titles, a results list) with a read-only JavaScript expression returning JSON (at most 4000 characters): the cheapest way to read, far smaller than browser_get_text or a snapshot. It runs in a world of its own where clicks, typing, submits and network writes are refused.
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": {
"expression": "<expression>"
},
"name": "browser_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema | No | JSON Schema the result must match | |
| expression | Yes | e.g. [...document.querySelectorAll('.result')].slice(0,10).map(e => e.innerText) |