A Python MCP server for browser automation using DrissionPage library, providing APIs for web automation operations controlled through AI
DrissionPageMCP has 17 tools with SEVERE definition quality gaps. Tool naming is inconsistent (mix of CamelCase and snake_case); descriptions range from machine-translated Chinese to English with minimal clarity. Critical issues: (1) Most tools lack input parameter descriptions entirely or use empty strings. (2) No output schemas are documented for any tool. (3) Parameter types are present but descriptions are sparse or missing. (4) Error handling guidance is absent across all tools. (5) Tool #3 (process_data) and #16 (run_cdp) have vague, incomplete descriptions that don't explain when to use them or what they return. (6) Many tools like 'get_all_clickable_elements', 'get_all_input_elements' lack parameter descriptions (empty input schemas). (7) Security-critical tools (connect_or_open_browser, element_input, run_js, run_cdp) lack warnings about destructive capabilities or input sanitization guidance. (8) Tool composition is poor: no clear data flow between discovery tools (get_all_clickable_elements) and action tools (element_click), agents must infer how to chain them.
用DrissionPage 打开或者接管已打开的浏览器,参数通过字典传递。如果url不为空则打开指定网址。
把元素转换为drissionpage格式的字符串
下载文件到指定路径
通过xpath点击标签页中某个元素,最好先判断元素是否存在
通过xpath给标签页中某个元素输入内容,最好先判断元素是否存在
获取当前标签页的所有可进行输入操作的元素,对元素进行输入操作前优先使用这个方法
获取当前标签页的所有可点击元素
Missing input parameter descriptions on 8+ tools (get_all_clickable_elements, get_all_input_elements, send_enter, getInputElementsInfo, get_body_text have empty or missing descriptions for all parameters). LLMs cannot infer what parameters control without explicit descriptions.
No output schemas documented for ANY tool. LLMs cannot plan downstream calls or extract required fields (e.g., what does get_all_clickable_elements return? Array of strings? Objects with id/name fields?). Critical for agent composition.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 38 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 0 | - | v1 |
获取当前标签页的所有可输入元素
获取当前标签页的body的文本内容
获取当前标签页的某个元素的html
通过xpath或者文本节点是否包含关键词判断标签页中某个元素是否存在
用DrissionPage 控制的浏览器,打开新标签页并 打开一个网址
从指定的资源 URI 读取数据,报告处理进度,并请求客户端的 LLM 对数据进行摘要。
在当前标签页中运行谷歌CDP协议代码并获取结果。举例1说明 run_cdp('Page.stopLoading')。举例2说明 run_cdp('Page.navigate', url='https://example.com')
在当前标签页中运行JavaScript代码并返回执行结果。查找网页元素,获取元素信息,操作网页元素优先使用这个方法。想要获取执行的js代码的返回值,可以在js_code中使用return语句。想要获取异步函数的返回值,可以参考下面代码 return (async (url) => { const response = await fetch(url); const data = await response.json(); return data; })("https://www.baidu.com/");
向当前页面发送 enter 回车键
生成一个请求对文本进行摘要的用户消息。
Inconsistent naming conventions: mix of snake_case (get_all_clickable_elements, is_element_exist) and CamelCase (getInputElementsInfo, convert_elemnet_to_drissionpage). Inconsistency confuses LLMs during tool selection. Also, typo in 'convert_elemnet_to_drissionpage' (should be 'element').
Vague descriptions on security-critical tools (run_js, run_cdp, connect_or_open_browser, element_input). No warning about destructive capabilities, injection risks, or input sanitization requirements. LLMs may misuse these tools without clear guidance on preconditions and side effects.
No error handling guidance. No tool description tells LLM what to do if a tool fails (e.g., 'element_click fails if element not found, call is_element_exist first'). No error classification (retryable vs fatal) or recovery paths.
Poor tool composition and discovery flow. get_all_clickable_elements/get_all_input_elements should document WHEN to call them (before element_click/element_input) and HOW results map to action parameters. Currently, agents must infer the relationship.
Tool 'test' has a generic, unclear purpose ('生成一个请求对文本进行摘要的用户消息'). Description does not explain WHEN an agent should call it or what it returns. Tool appears unused/experimental.
Tool 'process_data' has confusing description mentioning reading from resource URIs, progress reporting, and LLM summarization. Purpose is unclear; implementation in code does not match description fully.
Parameter descriptions for connect_or_open_browser are minimal (e.g., 'url (str, 可选)' instead of 'URL to open in new tab; if omitted, opens blank page'). No guidance on when debug_port, browser_path, headless, or use_system_user_path are needed.
No input validation or constraint documentation. E.g., element_input's input_value parameter has no length limits, escaping guidance, or examples. run_js accepts arbitrary JavaScript with no warning about XSS, infinite loops, or security implications.