chromium-cookies
Read and write Chromium app cookies, including HttpOnly, to seed authenticated sessions before e2e tests or assert cookie state after. Set, delete, clear, or get cookies via CDP.
Instructions
Read and write cookies of a Chromium (CDP) app, HttpOnly cookies included.
set needs name, value, and url or domain; delete needs name and url or domain.
Use when seeding an authenticated session before an e2e test (set the session cookie, then navigate) or asserting cookie state after one.
Returns { cookies, count } for get, or a small status object ({ set } / { deleted } / { cleared }) otherwise. Fails if the device is not a Chromium (CDP) device, or a param that set / delete needs is missing.
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": {
"udid": "<udid>",
"action": "<action>"
},
"name": "chromium-cookies"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | get: restrict to this URL (defaults to the active page). set/delete: scope the cookie by URL. | |
| name | No | Cookie name. | |
| path | No | set/delete: cookie path (default /). | |
| udid | Yes | Chromium device id from `list-devices` (e.g. `chromium-cdp-9222`). | |
| value | No | Cookie value. | |
| action | Yes | get: read cookies. set: create/update a cookie. delete: remove matching cookies. clear: remove ALL browser cookies. | |
| domain | No | set/delete: scope the cookie by domain. | |
| secure | No | set: mark Secure. | |
| expires | No | set: expiry as a Unix timestamp (seconds). Omit for a session cookie. | |
| httpOnly | No | set: mark HttpOnly. | |
| sameSite | No | set: SameSite policy. |