execute_javascript
Run custom JavaScript code inside an iOS WKWebView to inspect, modify, and test page behavior in real time.
Instructions
Evaluate a JavaScript expression in the page context
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": "execute_javascript"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes | JS code to evaluate | |
| await_promise | No | Await the result if it's a Promise |