inject_init_script
Injects a script that executes before page scripts on each navigation of the current tab. Scope limited to active tab; must be reapplied per tab if needed.
Instructions
Register a script that runs before page scripts on every navigation of the CURRENT tab. Scope is the active tab/target only — it is NOT auto-applied to other open tabs or to tabs opened later; re-run per tab if needed.
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": {
"script": "<script>"
},
"name": "inject_init_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |