page_run_code
Execute raw Playwright code snippets against a designated browser instance page, enabling custom automation logic for complex scenarios.
Instructions
Run a Playwright code snippet against the instance page. For advanced use cases.
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": {
"instanceId": "<instanceId>",
"code": "<code>"
},
"name": "page_run_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Async function body receiving (page) parameter. E.g. "async (page) => { return await page.title(); }" | |
| instanceId | Yes | Target instance |