page_eval
Evaluate a JavaScript expression in the page's main frame and return its JSON value. Use read-only expressions for safe introspection.
Instructions
Evaluate a JavaScript expression in the page's main frame and return its JSON value. Read-only introspection is safest; treat results of mutations with care.
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": {
"session_id": "<session_id>",
"page_id": "<page_id>",
"expression": "<expression>"
},
"name": "page_eval"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page_id | Yes | ||
| expression | Yes | JavaScript expression; the JSON-ified result is returned. | |
| session_id | Yes |