app_cookies
This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET
Read, set or clear the current WebView's cookies — the ones its page's URL is sent, HttpOnly ones included, which document.cookie cannot see. Vibium's cookies command, on a WebView: needs a web context, so switch with app_context first. "get" (the default) lists them; "set" sets each of cookies and reads the store back, so one the browser accepted and stored expired is reported, not claimed; "clear" deletes them all, or those called name. An Android app's WebViews share one cookie store, so a cookie set here is set for all of them.
Changes the device, the app or the session: readOnlyHint is false.
Arguments
| Name | Type | Required | What it is |
|---|---|---|---|
action | string: get, set, clear | get (default), set or clear. | |
cookies | array of object | With set: the cookies to set. | |
device | string | Device serial to target, e.g. "emulator-5554". Omit when only one device is running. | |
driver | string: uiautomator2, uiautomator, wda | Driver to use: "uiautomator2" (default for Android; fast, installs a server APK on first use), "uiautomator" (Android, installs nothing, slower, cannot type), or "wda" (WebDriverAgent: iOS simulators and iPhones). | |
name | string | With clear: delete only the cookies with this name. |
Examples
Each is the arguments of a tools/call request; the first is shown whole.
Read the WebView's cookies
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "app_cookies",
"arguments": {}
}
}
On an Android 15 emulator the answer's text was:
no cookies for about:blank

mobium cookies on an Android 15 emulator
Delete one cookie
{
"action": "clear",
"name": "session"
}