run_playwright
Execute custom async Playwright code with managed browser session access to automate web interactions, extract data, and control pages.
Instructions
Execute custom async Playwright code using the server-managed session
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": {
"code": "<code>"
},
"name": "run_playwright"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Async JavaScript code body to run with access to page, context, browser, params, console. Example: await page.click("a"); return await page.title(); | |
| timeoutMs | No | Execution timeout in milliseconds (default 15000) |