create_hook
Define a hook to capture arguments, return value, stack trace, or 'this' context from any JavaScript expression. Use with inject_hook to apply to pages or workers.
Instructions
Create a hook definition. Use inject_hook to attach it to the page or workers.
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": {
"name": "<name>",
"targetExpr": "<targetExpr>",
"capture": "<capture>"
},
"name": "create_hook"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| targetExpr | Yes | ||
| capture | Yes |