manage_cookies
Inspect, edit, delete, clear, and assert browser cookies at the Playwright context layer, including httpOnly cookies, to test Chrome extension behavior without relying on declared permissions.
Instructions
Inspect, edit, delete, and assert browser cookies at the Playwright context layer. Works regardless of the extension's declared permissions and can read httpOnly cookies. Restrictions in connect_browser (CDP) mode, where cookies belong to the user's real profile: 'clear' is disabled, 'delete' requires a cookie 'name', 'get' requires a 'url' or 'name' scope, 'set' won't replace an existing cookie unless overwrite is true, and cookie values are redacted unless include_values is true.
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": {
"action": "<action>"
},
"name": "manage_cookies"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | For 'get'/'assert': only consider cookies that would be sent to this URL. For 'set': the cookie's URL (alternative to domain+path). | |
| name | No | Cookie name. Filters 'get'; targets 'delete'; required for 'assert'. | |
| path | No | Exact cookie path. Filters 'delete'; disambiguates 'assert' when one cookie name exists at several paths on a domain (e.g. '/' and '/admin'). | |
| action | Yes | get: list cookies; set: add/update a cookie; delete: remove cookies matching a filter; clear: remove ALL cookies (load_extension mode only); assert: PASS/FAIL on a cookie's existence/value | |
| cookie | No | Full cookie object for 'set': { name, value, url | (domain & path), expires?, httpOnly?, secure?, sameSite? }. sameSite is Strict|Lax|None; expires is unix seconds. | |
| domain | No | Domain filter for 'delete'; optional disambiguator for 'assert'. A leading dot is ignored on both sides, so 'example.com' matches a cookie stored as '.example.com'. 'delete' matches the domain exactly (after dot-stripping) so it never reaches subdomains; 'assert' also accepts a parent domain-cookie that would be sent to the domain you name. | |
| overwrite | No | For 'set' in connect_browser mode: allow replacing a cookie that already exists on that domain/path. Off by default, because overwriting a real profile's session cookie can log you out or corrupt a live session. Ignored in load_extension mode, where writes are always allowed. | |
| expected_value | No | For 'assert': expected cookie value. Omit to assert mere existence. | |
| include_values | No | For 'get' and 'assert' in connect_browser mode: show real cookie values instead of redacting them. Off by default so session tokens from the user's real profile aren't exposed. Ignored in load_extension mode, where values are always shown. |