inject_hook
Injects a created hook into a page, a specific worker, or all workers to intercept JavaScript execution and enable debugging.
Instructions
Inject a created hook into the page or worker(s). target: "page" | "worker:" | "all-workers" (default "page").
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": {
"hookId": "<hookId>"
},
"name": "inject_hook"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hookId | Yes | ||
| target | No |