> Dea 0.9.9 documentation.
> Canonical page: https://dea.dardanica.app/docs/reference/tools/set-cookies/
> Documentation index: https://dea.dardanica.app/llms.txt

# set_cookies

Set, change or remove cookies in this tab's store. cookies is a list of {name, value}; a null value removes that cookie. Each applies to the tab's current site unless it carries url or domain. Optional per cookie: path, secure, httpOnly, sameSite (Lax, Strict, None), expires (a date or Unix time; omit for a session cookie; the browser keeps a cookie 400 days at most). Other tabs in the same profile share the store; a private tab's cookies stay in that tab. Reload the page for the site to react. Removing a login cookie signs that site out for the whole profile.

## Example

Call this MCP tool with the argument object below. Replace illustrative IDs, selectors, local paths, and project URLs with values observed in your session.


```json
{
  "cookies": [
    {
      "name": "theme",
      "value": "dark"
    },
    {
      "name": "old_flag",
      "value": null
    }
  ]
}
```


## Result

Returns which cookies were set and which were removed, each with the address it applies to. The site sees the change on its next request.

Results arrive in MCP content blocks. Most structured results are JSON in text blocks; image tools can include image blocks. Handle errors and partial or truncated data. No formal output schema is declared for this tool.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `cookies` | array of object | Yes | minItems: 1; maxItems: 50 |
| `tab` | string | No | Tab name or id in your workspace; does not change the visible tab. minLength: 1 |


## Full input schema

The schema includes nested shapes and constraints. Additional semantic constraints can apply at runtime; read the description and usage notes.


```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "cookies": {
      "minItems": 1,
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "null removes the cookie"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "domain": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "secure": {
            "type": "boolean"
          },
          "httpOnly": {
            "type": "boolean"
          },
          "sameSite": {
            "type": "string"
          },
          "expires": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ]
          }
        },
        "required": [
          "name",
          "value"
        ],
        "additionalProperties": false
      }
    },
    "tab": {
      "description": "Tab name or id in your workspace; does not change the visible tab.",
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "cookies"
  ],
  "additionalProperties": false
}
```


## Related documentation

[Reference conventions](https://dea.dardanica.app/docs/reference/) · [Agent operating guide](https://dea.dardanica.app/docs/agents/) · [Troubleshooting](https://dea.dardanica.app/docs/troubleshooting/)
