Import cookies from a JSON file
browser_import_cookies_from_fileReads an array of cookie objects from a JSON file and sets them in the existing shared BiDi session, avoiding manual entry and external-session conflicts.
Instructions
Read a JSON file containing an array of cookie objects and set them all inside the existing shared BiDi session. Each object may have {name, value, domain, path, expirySeconds, secure, httpOnly, sameSite}. This exists because an external script cannot open its own BiDi session while this server holds the only one, and hand-typing hundreds of cookies through browser_import_cookies is impractical.
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": {
"path": "<path>"
},
"name": "browser_import_cookies_from_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the JSON file |