Skip to main content
Glama
jumodada

DrissionPage MCP Server

by jumodada

Respond To Dialog

page_dialog_respond
Destructive

Accept or dismiss a pending JavaScript alert, confirm, or prompt. Responds via a capability-probed native dialog path using the specified action.

Instructions

Accept or dismiss one pending alert, confirm, or prompt through a capability-probed native DrissionPage dialog path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYes
tab_idNoOptional MCP or native DrissionPage tab id. When omitted, the current tab is captured at call start.
timeoutNoMaximum seconds to wait for a pending dialog. Zero checks immediately; an already-pending dialog still receives a bounded native response budget.
prompt_textNoText for an accepted prompt. The value is never returned.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 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"
      +}
    • addedOutput schema / $defs / ActionReceipt / properties / tab_id / description
      Added value: +"MCP tab id captured for this operation."
    • removedOutput schema / $defs / ActionReceipt / properties / tab_id / title
      Removed value: -"Tab Id"
    • changedOutput schema / oneOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "data": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "action": {
      -            "enum": [
      -              "accept",
      -              "dismiss"
      -            ],
      -            "title": "Action",
      -            "type": "string"
      -          },
      -          "dialog_message": {
      -            "$ref": "#/$defs/DialogMessageMetadata"
      -          },
      -          "dialog_type": {
      -            "enum": [
      -              "alert",
      -              "confirm",
      -              "prompt"
      -            ],
      -            "title": "Dialog Type",
      -            "type": "string"
      -          },
      -          "final_url": {
      -            "title": "Final Url",
      -            "type": "string"
      -          },
      -          "handled": {
      -            "const": true,
      -            "title": "Handled",
      -            "type": "boolean"
      -          },
      -          "prompt": {
      -            "$ref": "#/$defs/DialogPromptMetadata"
      -          },
      -          "receipt": {
      -            "$ref": "#/$defs/ActionReceipt"
      -          }
      -        },
      -        "required": [
      -          "dialog_type",
      -          "action",
      -          "handled",
      -          "dialog_message",
      -          "prompt",
      -          "final_url",
      -          "receipt"
      -        ],
      -        "title": "PageDialogRespondData",
      -        "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": {
      +          "action": {
      +            "enum": [
      +              "accept",
      +              "dismiss"
      +            ],
      +            "title": "Action",
      +            "type": "string"
      +          },
      +          "dialog_message": {
      +            "$ref": "#/$defs/DialogMessageMetadata"
      +          },
      +          "dialog_type": {
      +            "enum": [
      +              "alert",
      +              "confirm",
      +              "prompt"
      +            ],
      +            "title": "Dialog Type",
      +            "type": "string"
      +          },
      +          "final_url": {
      +            "title": "Final Url",
      +            "type": "string"
      +          },
      +          "handled": {
      +            "const": true,
      +            "title": "Handled",
      +            "type": "boolean"
      +          },
      +          "prompt": {
      +            "$ref": "#/$defs/DialogPromptMetadata"
      +          },
      +          "receipt": {
      +            "$ref": "#/$defs/ActionReceipt"
      +          },
      +          "tab_id": {
      +            "description": "MCP tab id captured for this operation.",
      +            "maxLength": 128,
      +            "minLength": 1,
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "dialog_type",
      +          "action",
      +          "handled",
      +          "dialog_message",
      +          "prompt",
      +          "final_url",
      +          "receipt",
      +          "tab_id"
      +        ],
      +        "title": "PageDialogRespondData",
      +        "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
  3. Removedv0.7.2
  4. Addedv0.7.2

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=false and readOnlyHint=false, so the safety profile is covered. The description adds the scoping detail that it handles exactly one pending dialog and notes a capability-probed native path, but says nothing about consequences of accept vs dismiss, error behavior when no dialog exists, or auth requirements, so it adds only modest context.

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

Conciseness4/5

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

A single sentences with the action front-loaded, so it reads efficiently. The trailing "capability-probed native DrissionPage dialog path" is implementation jargon that adds little agent-facing value but does not bloat the definition.

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?

An output schema exists, so return values need not be explained, and annotations carry the safety profile. The description plus schema covers the action, target, and timing adequately; only the outcome semantics of each action and the no-dialog case are left unstated, which keeps it short of fully complete.

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 75%, with tab_id, timeout, and prompt_text all documented in the schema itself, and the action enum is self-explanatory. The description only loosely echoes these ("accept/dismiss", "prompt") without adding syntax, default behavior, or interaction detail beyond the schema, so 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?

The description gives a specific verb pair ("Accept or dismiss") and a precise resource ("one pending alert, confirm, or prompt"), so an agent knows exactly what action is taken and on what. It is inherently distinguishable from the read-only sibling page_dialog_observe, which cannot take action on a dialog.

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?

The phrase "one pending alert, confirm, or prompt" implies the precondition of a dialog being pending, which is useful context. However, it never states when to use this versus page_dialog_observe, whether observing first is expected, or what happens if no dialog is present, leaving usage to inference.

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