notion_run_code
Execute custom async Playwright code on a Notion Desktop page for advanced automation or unsupported actions; prefer dedicated tools and avoid deletions.
Instructions
Escape hatch: run async (page) => {...} against the target page (Playwright Page with page.n helpers: n.db., n.table., n.tabs.*, n.slash, n.guard… see SKILL.md). Prefer the dedicated tools; never delete with this; use notion_delete_blocks so a backup exists.
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": "notion_run_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| page | No | Page URL or id. Default: the active Notion tab. |