Skip to main content
Glama
hooplus1ce

DrissionPage-MCP

by hooplus1ce

点击弹窗按钮

antd_modal_click

Clicks a button in a visible Ant Design modal (Modal.confirm) by matching button text, with options for exact match and frame targeting.

Instructions

点击当前可见 AntD 弹窗(Modal.confirm / Modal)中的按钮,如"确 定""取 消""确 定删除"。

自动寻找可见的 .ant-modal,在其 footer 或 confirm 区域真实点击匹配按钮。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exactNo是否精确匹配按钮文本
frameNo搜索范围('active'=激活态 iframe)
tab_idNo标签页 id,省略时用最新标签页
timeoutNo等待弹窗出现的秒数
button_textYes按钮文本(默认包含匹配,exact=True 精确匹配)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
messageYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations only provide readOnlyHint: false, so the description carries the behavioral burden. It discloses that the tool automatically finds visible .ant-modal, targets footer or confirm areas, and performs a real click. It also implicitly includes waiting via the timeout parameter. This adds useful behavioral detail without contradicting annotations.

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 sentences with no wasted words. The core purpose and mechanism are front-loaded, and examples are concise. It is appropriately sized for the tool's simplicity.

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?

Given the tool's narrow scope, an output schema, and full parameter documentation, the description covers the essential behavior: finding a visible modal and clicking a matching button. It could mention behavior on multiple visible modals or failure cases, but these are minor and not required for a correct call.

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 five parameters are documented in the schema. The description adds examples of button text ('确定', '取消') but does not explain parameter semantics beyond the schema. Baseline 3 applies because the schema does the heavy lifting.

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 clearly states it clicks a button in a visible AntD modal, naming specific modal types (Modal.confirm / Modal) and giving examples of button texts. It differentiates from generic element_click and other antd tools by scoping to modal-specific interactions.

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 description provides clear context for when to use it: when a visible AntD modal contains a button to click. It implies this is the dedicated tool for modal buttons, but it does not explicitly name alternatives or state when not to use it. Thus it has clear context without exclusions.

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