Skip to main content
Glama
jumodada

DrissionPage MCP Server

by jumodada

Observe Page Dialog

page_dialog_observe
Read-onlyIdempotent

Wait for a pending native JavaScript alert, confirm, or prompt and return its bounded message without dismissing or handling it.

Instructions

Observe a pending native alert, confirm, or prompt and return its bounded message without handling it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tab_idNoOptional MCP or native DrissionPage tab id. When omitted, the current tab is captured at call start.
timeoutNoSeconds to wait for a pending alert, confirm, or prompt.
max_message_charsNoMaximum dialog message characters returned to the MCP client.

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": {
      -          "dialog_type": {
      -            "anyOf": [
      -              {
      -                "enum": [
      -                  "alert",
      -                  "confirm",
      -                  "prompt"
      -                ],
      -                "type": "string"
      -              },
      -              {
      -                "type": "null"
      -              }
      -            ],
      -            "title": "Dialog Type"
      -          },
      -          "message": {
      -            "title": "Message",
      -            "type": "string"
      -          },
      -          "message_truncated": {
      -            "title": "Message Truncated",
      -            "type": "boolean"
      -          },
      -          "pending": {
      -            "title": "Pending",
      -            "type": "boolean"
      -          },
      -          "timed_out": {
      -            "title": "Timed Out",
      -            "type": "boolean"
      -          },
      -          "timeout": {
      -            "title": "Timeout",
      -            "type": "number"
      -          }
      -        },
      -        "required": [
      -          "pending",
      -          "timed_out",
      -          "dialog_type",
      -          "message",
      -          "message_truncated",
      -          "timeout"
      -        ],
      -        "title": "PageDialogObserveData",
      -        "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": {
      +          "dialog_type": {
      +            "anyOf": [
      +              {
      +                "enum": [
      +                  "alert",
      +                  "confirm",
      +                  "prompt"
      +                ],
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "title": "Dialog Type"
      +          },
      +          "message": {
      +            "title": "Message",
      +            "type": "string"
      +          },
      +          "message_truncated": {
      +            "title": "Message Truncated",
      +            "type": "boolean"
      +          },
      +          "pending": {
      +            "title": "Pending",
      +            "type": "boolean"
      +          },
      +          "tab_id": {
      +            "description": "MCP tab id captured for this operation.",
      +            "maxLength": 128,
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "timed_out": {
      +            "title": "Timed Out",
      +            "type": "boolean"
      +          },
      +          "timeout": {
      +            "title": "Timeout",
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "pending",
      +          "timed_out",
      +          "dialog_type",
      +          "message",
      +          "message_truncated",
      +          "timeout",
      +          "tab_id"
      +        ],
      +        "title": "PageDialogObserveData",
      +        "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

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety burden is lifted. The description adds meaningful behavior: the dialog is left pending and the message is 'bounded', i.e. truncated rather than a full dump. Does not mention blocking/timeout semantics, but that is covered by the timeout parameter.

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 tight sentence with the verb, resource, and the non-handling constraint front-loaded. No filler or redundancy.

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

Completeness4/5

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

Output schema exists so return values need not be explained, and annotations cover the safety profile. Only minor gap: the non-blocking/blocking behavior implied by timeout default 0 is not hinted at, but the schema documents it.

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 description coverage is 100%, so all three parameters (tab_id, timeout, max_message_chars) are documented in the schema itself. The description adds the notion that returned messages are bounded but no new parameter syntax or semantics. Baseline 3 is appropriate.

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

Purpose5/5

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

States a specific verb (observe) and resource (pending native alert/confirm/prompt) and adds the key scope qualifier 'without handling it', which cleanly separates it from the sibling page_dialog_respond. An agent can tell what it does and what it does not do.

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

Usage Guidelines4/5

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

The phrase 'without handling it' signals the use case (inspect a dialog without dismissing it), implying the contrast with page_dialog_respond. However, it never names the alternative nor states when-not-to-use, so an agent must infer the routing.

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