Skip to main content
Glama
jumodada

DrissionPage MCP Server

by jumodada

Set Browser Cookies

browser_cookies_set
DestructiveIdempotent

Set a bounded batch of browser cookies for a specified or current tab. Results preserve accepted metadata while redacting cookie values.

Instructions

Set a bounded batch of browser cookies. Successful results preserve accepted metadata while redacting cookie values.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tab_idNoOptional MCP or native DrissionPage tab id. When omitted, the current tab is captured at call start.
cookiesYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.8.8
    • addedInput schema / properties / tab_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maxLength": 128,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Optional MCP or native DrissionPage tab id. When omitted, the current tab is captured at call start.",
      +  "title": "Tab Id"
      +}
    • changedOutput schema / oneOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "data": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "cookies": {
      -            "items": {
      -              "$ref": "#/$defs/BrowserCookieWriteData"
      -            },
      -            "title": "Cookies",
      -            "type": "array"
      -          },
      -          "count": {
      -            "title": "Count",
      -            "type": "integer"
      -          },
      -          "set": {
      -            "const": true,
      -            "title": "Set",
      -            "type": "boolean"
      -          }
      -        },
      -        "required": [
      -          "count",
      -          "set",
      -          "cookies"
      -        ],
      -        "title": "BrowserCookiesSetData",
      -        "type": "object"
      -      },
      -      "message": {
      -        "type": "string"
      -      },
      -      "ok": {
      -        "const": true
      -      }
      -    },
      -    "required": [
      -      "ok",
      -      "message",
      -      "data"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "data": {
      -        "additionalProperties": true,
      -        "type": "object"
      -      },
      -      "error": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "code": {
      -            "type": "string"
      -          },
      -          "details": {
      -            "additionalProperties": true,
      -            "type": "object"
      -          },
      -          "message": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "code",
      -          "message"
      -        ],
      -        "type": "object"
      -      },
      -      "message": {
      -        "type": "string"
      -      },
      -      "ok": {
      -        "const": false
      -      }
      -    },
      -    "required": [
      -      "ok",
      -      "message",
      -      "error"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "data": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "cookies": {
      +            "items": {
      +              "$ref": "#/$defs/BrowserCookieWriteData"
      +            },
      +            "title": "Cookies",
      +            "type": "array"
      +          },
      +          "count": {
      +            "title": "Count",
      +            "type": "integer"
      +          },
      +          "set": {
      +            "const": true,
      +            "title": "Set",
      +            "type": "boolean"
      +          },
      +          "tab_id": {
      +            "description": "MCP tab id captured for this operation.",
      +            "maxLength": 128,
      +            "minLength": 1,
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "count",
      +          "set",
      +          "cookies",
      +          "tab_id"
      +        ],
      +        "title": "BrowserCookiesSetData",
      +        "type": "object"
      +      },
      +      "message": {
      +        "type": "string"
      +      },
      +      "ok": {
      +        "const": true
      +      }
      +    },
      +    "required": [
      +      "ok",
      +      "message",
      +      "data"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "data": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "error": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "code": {
      +            "type": "string"
      +          },
      +          "details": {
      +            "additionalProperties": true,
      +            "type": "object"
      +          },
      +          "message": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "code",
      +          "message"
      +        ],
      +        "type": "object"
      +      },
      +      "message": {
      +        "type": "string"
      +      },
      +      "ok": {
      +        "const": false
      +      }
      +    },
      +    "required": [
      +      "ok",
      +      "message",
      +      "error"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. Addedv0.8.0

TDQS

A3.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare destructiveHint=true, idempotentHint=true, and openWorldHint=true, so safety is covered. The description adds genuinely useful context beyond that: successful results preserve accepted metadata while redacting cookie values, telling the agent that secrets are not echoed back. It omits error behavior for rejected cookies, but the redaction disclosure is real added value.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences with the operation stated first and the outcome disclosure second. Nothing wasted and no burying of key information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists so return shape need not be explained, and annotations carry the safety profile. However, for a destructive batch write with a nested cookie payload, the description never mentions the batch cap, per-cookie validation failures, or tab targeting nuances, leaving modest gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 50%, and the description contributes little parameter detail — 'bounded batch' loosely corroborates the maxItems=100/minItems=1 constraint but adds no field-level meaning. The tab_id description lives entirely in the schema, so the description neither compensates for the gap nor contradicts it; baseline 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Set a bounded batch of browser cookies') and the word 'bounded' signals batch limits. It clearly names the write operation, letting an agent distinguish it from siblings like browser_cookies_get/delete/clear, though it never explicitly names those alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this versus browser_cookies_delete, browser_cookies_clear, or storage_set, and no mention of prerequisites such as which tab is targeted. An agent gets no routing help beyond the name.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.