chrome_send_command_to_inject_script
Trigger user-defined events in an injected browser script by sending a JSON payload to the correct environment and tab. Use it to activate event listeners set up in a DICloak browser profile.
Instructions
If the script injected using chrome_inject_script listens for user-defined events, this tool can be used to trigger those events
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": {
"envId": "<envId>",
"eventName": "<eventName>"
},
"name": "chrome_send_command_to_inject_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| envId | Yes | Environment ID for the browser environment to operate. | |
| tabId | No | The tab where you previously injected the script (if not provided, use the currently active tab) | |
| payload | No | The payload passed to event, must be a JSON string | |
| eventName | Yes | The eventName your injected content script listens for |