Set a cookie
browser_set_cookieCreate or replace a single browser cookie with scoped domain, path, expiry, and security flags, then verify the stored value with browser_get_cookies.
Instructions
Create or replace one cookie (BiDi storage.setCookie). domain and path scope it; omit domain for a host-only cookie. Use browser_get_cookies afterwards to confirm the value and expiry the browser actually stored.
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>",
"value": "<value>",
"domain": "<domain>"
},
"name": "browser_set_cookie"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Cookie name | |
| path | No | Cookie path (default "/") | |
| value | Yes | Cookie value | |
| domain | Yes | Cookie domain, e.g. "127.0.0.1" | |
| secure | No | Mark the cookie Secure | |
| httpOnly | No | Mark the cookie HttpOnly | |
| sameSite | No | SameSite policy | |
| expirySeconds | No | Expiry as a Unix timestamp in seconds |