Skip to main content
Glama
jumodada

DrissionPage MCP Server

by jumodada

Set Browser User Agent

browser_user_agent_set
DestructiveIdempotent

Override the current tab's user agent and optional platform, returning the previous user agent so callers can restore it later.

Instructions

Override the current tab user agent and optional platform, returning the previous user agent so callers can restore it.

Input Schema

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

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": {
      -          "platform": {
      -            "anyOf": [
      -              {
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "title": "Platform"
      -          },
      -          "previous_user_agent": {
      -            "title": "Previous User Agent",
      -            "type": "string"
      -          },
      -          "set": {
      -            "const": true,
      -            "title": "Set",
      -            "type": "boolean"
      -          },
      -          "user_agent": {
      -            "title": "User Agent",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "previous_user_agent",
      -          "user_agent",
      -          "platform",
      -          "set"
      -        ],
      -        "title": "BrowserUserAgentSetData",
      -        "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": {
      +          "platform": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "title": "Platform"
      +          },
      +          "previous_user_agent": {
      +            "title": "Previous User Agent",
      +            "type": "string"
      +          },
      +          "set": {
      +            "const": true,
      +            "title": "Set",
      +            "type": "boolean"
      +          },
      +          "tab_id": {
      +            "description": "MCP tab id captured for this operation.",
      +            "maxLength": 128,
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "user_agent": {
      +            "title": "User Agent",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "previous_user_agent",
      +          "user_agent",
      +          "platform",
      +          "set",
      +          "tab_id"
      +        ],
      +        "title": "BrowserUserAgentSetData",
      +        "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 and idempotentHint=true, so the safety profile is covered. The description adds genuinely new context beyond that: the call returns the previous user agent, meaning the destructive change is reversible via a restore step. It stops short of saying whether the override persists across navigations or tabs.

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?

A single front-loaded sentence that states the action, the optional qualifier, and the return value with zero filler. Nothing could be cut without losing 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 for the returned previous UA and annotations cover the mutation semantics, so the core gaps are filled elsewhere. Still missing is any guidance on platform value format or override persistence, leaving an agent with only partial information for a destructive, open-world operation.

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

Parameters2/5

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

Schema description coverage is low (33%) — only tab_id is documented in the schema, while platform and user_agent are not. The description only repeats that platform is optional, which the schema's null default already conveys, and says nothing about valid platform tokens (e.g., 'Win32', 'MacIntel') or UA string expectations.

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?

The description names a specific verb and resource ('Override the current tab user agent and optional platform') and adds a useful side effect ('returning the previous user agent'). It does not, however, distinguish itself from the sibling browser_headers_set, which also mutates browser identity state.

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

Usage Guidelines3/5

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

Usage is only implied: the mention of returning the previous UA hints at a save/restore workflow, but there is no explicit when-to-use, when-not-to-use, or reference to the browser_headers_set alternative. An agent must infer the scenario.

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