read_js
Evaluate a JavaScript expression in the current page and return its value, enabling agents to read dynamic page state without navigation.
Instructions
Evaluate a JS expression in the page and return its value. This is arbitrary JavaScript: an expression can change page state, so treat it as an action and keep it for reading values only (disable with --no-eval).
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": "read_js"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |