run_cdp
Execute Chrome DevTools Protocol commands on the current tab and retrieve the result, enabling direct browser control such as navigation or page load stopping.
Instructions
在当前标签页中运行谷歌CDP协议代码并获取结果
Args:
cmd: CDP协议命令
**cmd_args: CDP命令参数Returns: Any: CDP命令执行结果
Note: 举例1说明 run_cdp('Page.stopLoading') 举例2说明 run_cdp('Page.navigate', url='https://example.com')
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": {
"cmd": "<cmd>",
"cmd_args": "<cmd_args>"
},
"name": "run_cdp"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cmd | Yes | ||
| cmd_args | Yes |