Manage Cookies
manage_cookiesInspect, clear, save, or load browser cookies to manage session state, preserve logins between runs, or reset website settings 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. - "load": Load cookies from filename into the current browser session.
filename: The name of the file to save/load cookies from.
Will be sanitized and saved in a restricted directory.
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.
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.
Tool selection: - Need cookies or authentication cookies -> use this tool. - Need localStorage/sessionStorage -> use manage_storage. - Need arbitrary JavaScript or storage operations not covered here -> use run_javascript. - Need visible page content or HTML -> use get_content. - Need an element's HTML attributes -> use get_attributes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | get_all | |
| filename | No | cookies.txt |