mcp-playwright
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-playwrightgo to example.com and return the page title"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Playwright MCP Server
一个基于 FastMCP 框架的专业级 Playwright 浏览器自动化 MCP 服务器,为 LLM 应用提供强大的网页交互和数据提取能力。
🌟 特性
🎯 核心功能
浏览器自动化: 完整的 Playwright 浏览器控制能力
多引擎支持: 支持 Chromium、Firefox、WebKit
会话管理: 独立的浏览器会话,支持并发操作
资源管理: 智能的生命周期管理和资源清理
错误恢复: 完善的错误处理和超时控制
🏗️ 工程化特性
模块化设计: 清晰的代码架构和职责分离
类型安全: 完整的 TypeScript 风格类型注解
异步安全: 基于 asyncio 的并发安全实现
生命周期管理: 使用 FastMCP 的生命周期机制
日志系统: 结构化的日志记录和监控
🛠️ 工具集合
浏览器控制: 创建/关闭会话、页面导航
页面交互: 点击、输入、等待元素
数据提取: 文本内容、属性值、页面信息
高级功能: 截图、JavaScript 执行
资源接口: 会话状态、健康检查
Related MCP server: Playwright MCP
🚀 快速开始
安装
# 从 PyPI 安装(推荐)
pip install mcp-playwright
# 或使用 uv
uv add mcp-playwright
# 安装 Playwright 浏览器
playwright install
# 开发安装(从源码)
git clone https://github.com/ma-pony/mcp-playwright.git
cd mcp-playwright
# 使用 uv 安装依赖(推荐)
uv sync
# 或使用 pip
pip install -e .
# 安装 Playwright 浏览器
uv run playwright install
# 或
playwright install运行服务器
# 使用已安装的包
mcp-playwright
# 或从源码运行
python main.py
# 或使用 uv
uv run python main.py
# 使用 MCP 开发工具
uv run mcp dev main.pyClaude Desktop 集成
将以下配置添加到 Claude Desktop 的 MCP 配置文件中:
{
"mcpServers": {
"playwright": {
"command": "mcp-playwright"
}
}
}或者如果从源码运行:
{
"mcpServers": {
"playwright": {
"command": "uv",
"args": ["run", "python", "/path/to/mcp-playwright/main.py"],
"env": {}
}
}
}📖 使用指南
基本工作流程
创建浏览器会话
# 使用 create_browser_session 工具
await create_browser_session(
browser_type="chromium",
headless=True,
viewport_width=1280,
viewport_height=720
)导航到目标网站
await navigate_to_url("https://example.com")页面交互
# 点击元素
await click_element("#login-button")
# 填写表单
await fill_input("#username", "your-username")
await fill_input("#password", "your-password")
# 等待元素
await wait_for_selector(".dashboard", state="visible")数据提取
# 获取文本内容
title = await get_page_title()
content = await get_text_content(".main-content")
# 获取属性值
href = await get_element_attribute("a.download", "href")截图和分析
# 截取页面截图
screenshot = await take_screenshot(full_page=True)
# 执行 JavaScript
result = await execute_javascript("return document.readyState")关闭会话
await close_browser_session()高级用法
错误处理
所有工具都内置了完善的错误处理,会返回详细的错误信息:
# 如果元素不存在或超时,会返回描述性错误信息
result = await click_element("#non-existent", timeout=5000)
# 返回: "点击超时: #non-existent"会话状态监控
# 检查会话状态
status = await get_resource("session://status")
# 检查浏览器健康状态
health = await get_resource("browser://health")🏗️ 架构设计
核心组件
┌─────────────────────────────────────────────┐
│ Playwright MCP 服务器 │
│ ┌─────────────┬─────────────┬─────────────┐ │
│ │ 会话管理 │ 工具层 │ 资源层 │ │
│ └─────────────┴─────────────┴─────────────┘ │
├─────────────────────────────────────────────┤
│ Playwright 管理器 │
│ ┌─────────────┬─────────────┬─────────────┐ │
│ │ 浏览器池 │ 页面管理 │ 生命周期 │ │
│ └─────────────┴─────────────┴─────────────┘ │
└─────────────────────────────────────────────┘设计原则
工程化: 模块化设计、依赖注入、统一配置
稳定性: 资源管理、异步安全、优雅关闭
可扩展性: 插件架构、会话隔离、类型安全
详细架构说明请参阅 TECHNICAL_ARCHITECTURE.md
🛠️ 工具参考
浏览器控制
create_browser_session- 创建新的浏览器会话close_browser_session- 关闭当前浏览器会话navigate_to_url- 导航到指定URL
页面交互
click_element- 点击页面元素fill_input- 填写输入框wait_for_selector- 等待元素出现
数据提取
get_text_content- 获取元素文本内容get_element_attribute- 获取元素属性值get_page_title- 获取页面标题get_page_url- 获取当前页面URL
高级功能
take_screenshot- 截取页面截图execute_javascript- 执行JavaScript代码
资源接口
session://status- 当前会话状态browser://health- 浏览器健康检查help://tools- 工具使用帮助
🔧 配置选项
浏览器配置
browser_type: 浏览器类型(chromium, firefox, webkit)headless: 无头模式(默认: true)max_sessions: 最大会话数(默认: 10)
性能配置
default_timeout: 默认超时时间(默认: 30000ms)viewport_width: 视口宽度(默认: 1280)viewport_height: 视口高度(默认: 720)
🧪 测试
# 运行单元测试
uv run pytest tests/
# 运行特定测试
uv run pytest tests/test_browser_manager.py
# 运行集成测试
uv run pytest tests/integration/📊 性能优化
资源管理
智能会话池化,避免频繁创建/销毁浏览器
弱引用管理,防止内存泄漏
自动资源清理,确保稳定运行
并发控制
异步锁保护关键操作
最大会话数限制,防止资源耗尽
上下文管理器确保资源释放
🔒 安全考虑
访问控制
会话隔离,防止交叉访问
超时控制,避免长时间占用
错误边界,防止异常传播
资源限制
最大会话数限制
内存使用监控
CPU 使用优化
🤝 贡献
欢迎贡献代码!请遵循以下步骤:
Fork 本仓库
创建特性分支 (
git checkout -b feature/amazing-feature)提交更改 (
git commit -m 'Add some amazing feature')推送到分支 (
git push origin feature/amazing-feature)创建 Pull Request
开发环境设置
# 克隆你的 fork
git clone https://github.com/your-username/mcp-playwright.git
# 安装开发依赖
uv sync --dev
# 运行代码格式化
uv run black .
uv run isort .
# 运行类型检查
uv run mypy .📄 许可证
本项目采用 MIT 许可证 - 详情请参阅 LICENSE 文件。
🙏 致谢
Playwright - 强大的浏览器自动化库
FastMCP - 现代化的 MCP 框架
Model Context Protocol - LLM 上下文协议标准
📞 支持
如果您有任何问题或需要帮助:
📁 提交 Issue
💬 讨论区
📧 Email: your-email@example.com
Playwright MCP Server - 为 LLM 应用提供强大的浏览器自动化能力 🚀
Available Tools
12 toolsclick_elementC
点击页面元素
Args:
selector: CSS选择器或XPath
timeout: 超时时间(毫秒)
force: 强制点击
| Name | Required | Description | Default |
|---|---|---|---|
| selector | Yes | ||
| timeout | No | ||
| force | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided. Description does not disclose behavioral traits like whether navigation waits or if clicks trigger navigation. No hints about side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Very short and front-loaded, but lacks structured sections. One-line purpose plus parameter list is efficient but minimal.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema, no annotations, and no return value description. For a click action with three parameters, more context is needed (e.g., click behavior, error cases).
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, but description only lists parameter names without explaining formats, acceptable values, or behavior (e.g., force meaning). Does not compensate for missing schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it clicks a page element, which is a specific verb+resource. It distinguishes from siblings like fill_input and get_text_content.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use click_element vs other tools like wait_for_selector or execute_javascript. No context on prerequisites or when to avoid.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
close_browser_sessionA
关闭当前浏览器会话
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description lacks behavioral details beyond the basic action. No annotations are provided, so the description should disclose side effects (e.g., invalidating handles, releasing resources). It only states the action without clarifying what happens after closing.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence that efficiently conveys the tool's purpose. No extraneous information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the absence of annotations and output schema, the description is minimal. It adequately states the action but fails to provide context on consequences or dependencies, which are important for a session management tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are no parameters, and schema coverage is 100%. The description adds no parameter information, which is acceptable since none exist. Baseline for 0 parameters is 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's action: 'Close current browser session'. It uses a specific verb and resource, and distinguishes it from sibling tools like create_browser_session.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool, such as prerequisites like having an active session, or when not to use it. It does not mention alternatives or proper sequencing with sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
create_browser_sessionA
创建新的浏览器会话
Args:
browser_type: 浏览器类型 (chromium, firefox, webkit)
headless: 是否无头模式
viewport_width: 视口宽度
viewport_height: 视口高度
timeout: 默认超时时间(毫秒)
| Name | Required | Description | Default |
|---|---|---|---|
| browser_type | No | chromium | |
| headless | No | ||
| viewport_width | No | ||
| viewport_height | No | ||
| timeout | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, and the description does not disclose important behaviors such as return value (session ID?), side effects of multiple calls, or required permissions. It only lists parameters.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise: one line for purpose followed by a bullet list of parameters. No unnecessary words, and the structure makes it easy to scan.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite listing all 5 parameters, the description lacks critical context: no mention of return value, no indication that the session must be closed with a sibling tool, and no explanation of what constitutes a session. Given no output schema, this is a significant gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema coverage, the description compensates by explaining each parameter in Chinese, including example values for browser_type (chromium, firefox, webkit) and clarifying headless meaning. However, it could be more detailed, e.g., units for timeout.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states '创建新的浏览器会话' (create new browser session), which is a specific verb and resource. It clearly distinguishes from sibling tools like click_element and close_browser_session which operate on existing sessions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied as the tool to start a browser session before using other tools, but no explicit guidelines on when to use versus alternatives, nor any prerequisites or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
execute_javascriptC
执行JavaScript代码
Args:
code: JavaScript代码
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description fails to disclose any behavioral traits such as whether the code executes in the browser context, potential side effects, or security considerations. This is a critical gap for a code execution tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very short and efficiently uses two lines to state the purpose and argument. However, it sacrifices necessary detail, making it under-specified rather than optimally concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool executes arbitrary code, the description is severely incomplete. It omits return value, side effects, execution context, and any constraints. For a potentially powerful tool, this level of incompleteness is unacceptable.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%. The description only lists 'Args: code: JavaScript代码' which adds no meaning beyond the schema's 'Code' title. It does not explain the expected format, limits, or purpose of the code parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description '执行JavaScript代码' (Execute JavaScript code) clearly states the action and resource, but it essentially restates the tool name without adding scope or differentiation. It is clear enough but not enriched beyond the name.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus sibling tools like click_element or navigate_to_url. The description does not mention prerequisites, return values, or scenarios where executing JavaScript is appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
fill_inputA
填写输入框
Args:
selector: CSS选择器或XPath
text: 要输入的文本
timeout: 超时时间(毫秒)
| Name | Required | Description | Default |
|---|---|---|---|
| selector | Yes | ||
| text | Yes | ||
| timeout | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description does not disclose behavioral traits beyond the parameter list. For instance, it does not specify if the tool clears existing text, triggers events, or waits for the element. With no annotations, this is a significant gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely brief with zero waste: a one-line title and a bullet list of args. Every sentence is necessary and front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and no annotations, the description covers basic usage but omits return value, edge cases, and version of clearing behavior. It is adequate but not thorough for a 3-parameter tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Despite 0% schema coverage, the description adds meaning: 'CSS选择器或XPath' clarifies selector type, '要输入的文本' explains text, and '超时时间(毫秒)' gives timeout unit. This compensates for the schema lack of descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states '填写输入框' (fill input box), a specific verb-resource pair that clearly distinguishes from siblings like click_element or get_text_content. It unambiguously indicates the tool fills an input field.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives (e.g., click_element for focusing, execute_javascript for custom input). No exclusions or prerequisites are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_element_attributeC
获取元素属性值
Args:
selector: CSS选择器或XPath
attribute: 属性名
timeout: 超时时间(毫秒)
| Name | Required | Description | Default |
|---|---|---|---|
| selector | Yes | ||
| attribute | Yes | ||
| timeout | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It does not disclose return format, error behavior (e.g., if attribute not found), or whether it throws errors on missing elements. Critical behavioral details are missing.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with one line of purpose and a bullet list of parameters. No redundant information, but could include more details without harming conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With 3 parameters and no output schema, the description should provide more details on return value format, error handling, and attribute types. It currently lacks completeness for an agent to reliably use this tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%. The description adds minimal context: selector can be CSS or XPath, attribute is property name, timeout in milliseconds. No details on valid formats, default timeout, or examples.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description '获取元素属性值' clearly states the tool's purpose: get an element attribute. It distinguishes from sibling tools like click_element or get_text_content, which perform different actions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. No mention of when not to use or what prerequisites exist. The description only lists parameters but lacks usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_page_titleA
获取页面标题
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations present, the description should carry the full burden of behavioral disclosure. It only states 'get page title' without elaborating on behavior such as whether it requires a loaded page or what happens if the title is missing. It is minimally adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, straightforward sentence with no extraneous words. It is appropriately concise for a simple tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (no parameters, no output schema), the description is largely complete. However, it does not specify the return format or any edge cases, which would improve completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are no parameters, so the baseline score is 4. The description adds no parameter information, which is acceptable given the absence of parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb '获取' (get) and resource '页面标题' (page title), making the purpose immediately clear. It effectively distinguishes from sibling tools like get_page_url and get_text_content.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no explicit guidance on when to use this tool versus alternatives. Usage is implied as a simple getter, but it does not mention any conditions or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_page_urlA
获取当前页面URL
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description does not disclose behavioral traits such as read-only nature, potential errors, or return format. The description simply states the action without further context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise, using a single phrase that directly conveys the tool's purpose. Every word is necessary and there is no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (no parameters, no output schema), the description adequately informs that the tool retrieves the current page URL. It implies the return value is the URL string, which is sufficient for a low-complexity tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has no parameters, so the baseline is 4. The description does not need to add parameter semantics since there are none. It correctly reflects the empty input schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool gets the current page URL. It uses a specific verb ('获取' meaning 'get') and resource ('当前页面URL' meaning 'current page URL'). This distinguishes it from sibling tools like get_page_title (gets title) and navigate_to_url (changes URL).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives such as get_page_title or execute_javascript. There are no explicit when/when-not contexts or prerequisites mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_text_contentC
获取元素文本内容
Args:
selector: CSS选择器或XPath
timeout: 超时时间(毫秒)
| Name | Required | Description | Default |
|---|---|---|---|
| selector | Yes | ||
| timeout | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist. Description does not disclose key behaviors: whether it returns text of first matching element, behavior on not found, error handling, or timeout effects. Minimal transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two lines of Chinese text are extremely concise. Content is front-loaded with the main purpose. Could be longer but is efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and simple structure, description falls short: no return format, error handling, or behavior with multiple elements. Leaves agent guessing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema has 0% description coverage. Description adds basic info for each parameter (selector is CSS/XPath, timeout is milliseconds), but lacks depth like acceptable selector patterns or timeout behavior.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves text content of an element, using a specific verb and resource. It distinguishes from sibling tools like get_element_attribute, but could be more explicit.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs alternatives like wait_for_selector or get_element_attribute. No prerequisites or context provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
take_screenshotC
截取页面截图
Args:
path: 保存路径(可选)
full_page: 是否截取整页
quality: 图片质量(1-100)
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| full_page | No | ||
| quality | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations present, so description carries full burden. It does not disclose what happens when 'path' is omitted, whether the result is saved or returned, or any side effects. Minimal behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is very short and to the point. Each sentence adds value: purpose and parameter explanations. No filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having 3 parameters and no output schema or annotations, the description does not cover return value, default behavior when path is null, or any behavioral constraints. Incomplete for a tool that likely produces a file or data.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%. Description explains each parameter in Chinese: path as optional save path, full_page as full-page toggle, quality as image quality range. This adds meaning beyond schema titles, but depth is minimal.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description '截取页面截图' clearly indicates the tool takes a page screenshot. It is a specific verb-resource pair. No sibling tools overlap in purpose, so differentiation is not needed.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. No exclusion or context provided. The description lacks any usage hints.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
wait_for_selectorB
等待元素出现
Args:
selector: CSS选择器或XPath
timeout: 超时时间(毫秒)
state: 元素状态 (attached, detached, visible, hidden)
| Name | Required | Description | Default |
|---|---|---|---|
| selector | Yes | ||
| timeout | No | ||
| state | No | visible |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so the description must fully disclose behavior. It only states the basic action and parameters, missing details on blocking, timeout effects, return values, or error handling.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with a single line and clear bullet points for arguments. However, using Chinese may reduce clarity for non-Chinese speaking agents.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Lacks essential context such as blocking behavior, return value, error handling on timeout, or side effects. Given no output schema or annotations, the description should provide more completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds meaning beyond the schema by clarifying that selector can be CSS or XPath, timeout is in milliseconds, and state has four valid values. This compensates for the schema's minimal type-only spec.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool waits for a DOM element to appear, with the ability to specify different states. This distinguishes it from sibling tools like click_element or navigate_to_url.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives, nor any prerequisites or context for its usage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
12 tool updates
v0.1.1- First observed
click_element - First observed
close_browser_session - First observed
create_browser_session - First observed
execute_javascript - First observed
fill_input - First observed
get_element_attribute - First observed
get_page_title - First observed
get_page_url - First observed
get_text_content - First observed
navigate_to_url - First observed
take_screenshot - First observed
wait_for_selector
TDQS
Each tool targets a distinct browser action: clicking, filling, navigating, screenshotting, etc. No two tools have overlapping functionality.
All tools follow a consistent verb_noun snake_case pattern (e.g., click_element, fill_input, get_page_title). No deviations.
12 tools cover the essential browser automation operations without being excessive. The count is well-scoped for the domain.
Core workflows like navigation, input, clicking, and screenshots are present. Minor gaps like scrolling or hover are absent but can be worked around.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Provides cloud browser automation capabilities using Stagehand and Browserbase, enabling LLMs to i…
AI-powered browser automation — navigate, click, fill forms, and extract data from any website.
Stealth web automation for AI agents. Login, signup, navigate, screenshot.
Stealth web automation for AI agents. Login, signup, navigate, screenshot.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables browser automation using Playwright, allowing LLMs to interact with web pages, take screenshots, generate test code, scrape web pages, and execute JavaScript in a real browser environment.18,122MIT
- AlicenseNot gradedqualityCmaintenanceProvides browser automation capabilities using Playwright, allowing LLMs to interact with web pages through structured accessibility snapshots without needing screenshots or vision models.2Apache 2.0
- FlicenseNot gradedqualityDmaintenanceProvides browser automation capabilities for AI assistants, enabling web navigation, form filling, and data extraction through Playwright.-
- AlicenseNot gradedqualityDmaintenanceProvides browser automation capabilities using Playwright, allowing LLMs to interact with web pages through structured accessibility snapshots.5,881,527Apache 2.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ma-pony/mcp-playwright'
If you have feedback or need assistance with the MCP directory API, please join our Discord server