manage_cookies
Inspect, clear, save, or restore browser cookies to preserve login sessions or reset website state during testing.
Instructions
Manage cookies for the current browser session.
Use this tool to inspect, clear, save, or restore browser cookies. Cookie management is useful for inspecting session state, preserving login sessions between browser runs, restoring previously saved sessions, or resetting website state during testing.
Args: action: - "get_all": Return all cookies currently available to the browser, including attributes such as name, value, domain, path, expiry, and security flags. - "clear": Delete all cookies from the current browser session. - "save": Save current cookies to filename. The file may be created or overwritten. - "load": Load cookies from filename into the current browser session. filename: Filesystem path used by save/load. Defaults to "cookies.txt". Ignored for get_all and clear.
Returns: "get_all": Current browser cookies. "clear": Confirmation that cookies were cleared. "save": Confirmation containing the destination filename. "load": Confirmation containing the source filename.
Security: Cookie data can contain authentication credentials, session identifiers, and other private information. Only inspect, save, load, or share cookies when explicitly authorized.
`filename` is passed to SeleniumBase's cookie persistence methods and
can access the filesystem available to the MCP server. Use only
trusted, authorized paths. The save action may overwrite an existing
file.Notes: Loading saved cookies does not guarantee restoration of a login. Cookies may be expired, invalidated, domain/path restricted, or dependent on other browser state. Navigate to the relevant site when necessary so the browser has the appropriate origin for the cookies.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | get_all | |
| filename | No | cookies.txt |