pilot_import_cookies
Import cookies from a Chromium browser to transfer authenticated sessions to a headless browser, avoiding re-login and gaining access to protected pages.
Instructions
Import cookies from a real Chromium browser (Chrome, Arc, Brave, Edge, Comet) by decrypting the browser's cookie database and adding them to the headless session. Use when the user wants to transfer authentication state from their real browser, avoid re-login, access authenticated pages, or work with session cookies from an existing browser profile.
Parameters:
browser: Browser name to import from — "chrome", "arc", "brave", "edge", or "comet". Auto-detects if omitted
domains: Array of cookie domains to import (e.g., [".github.com", ".google.com"]). Omit to import ALL cookies (up to max_cookies)
profile: Browser profile name to read cookies from (default: "Default"). Use list_profiles to see available profiles
list_browsers: Set to true to list installed Chromium browsers on the system instead of importing
list_profiles: Set to true with browser to list available profiles for that browser
list_domains: Set to true with browser to list cookie domains available in that browser's database
Returns:
Import mode: Count of cookies imported, per-domain breakdown, and count of any that failed to decrypt
list_browsers mode: List of installed browser names
list_profiles mode: List of profiles with display names
list_domains mode: Top 50 cookie domains with counts
Errors:
"No Chromium browsers found": No supported browsers are installed. Check the system.
"Browser not found": The specified browser is not installed. Use list_browsers to see available options.
"Cookie database not found": The browser's cookie file does not exist at the expected path. Check the profile name.
Decryption failures: Some cookies may fail to decrypt (e.g., on Linux without keyring access). The count is reported.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| browser | No | Browser name (chrome, arc, brave, edge, comet). Auto-detects if omitted. | |
| domains | No | Cookie domains to import (e.g. [".github.com"]). Omit to import ALL cookies. | |
| max_cookies | No | Max cookies to import when domains is omitted (default: 500) | |
| profile | No | Browser profile name (default: "Default") | |
| list_browsers | No | List installed browsers instead of importing | |
| list_profiles | No | List available profiles for the specified browser | |
| list_domains | No | List cookie domains available in the browser |