web_screenshot
Capture screenshots of web pages using a real browser, including logged-in or JavaScript-rendered content, and save as PNG/PDF with a local file path.
Instructions
用真实浏览器渲染页面并截图,保存为 PNG(或 PDF)并返回本地文件路径。
与 web_fetch 共用浏览器池与登录态:需要登录/JS 渲染的页面会先带上已保存的 session,再按需等待某个元素出现后截图,适合"给模型看一眼页面长什么样"。
Args:
url: 目标网页完整 URL。
path: 保存路径(可为相对或绝对路径,父目录自动创建);不传则存到
DATA_DIR/screenshots/ 下,文件名按 URL 与参数派生。
full_page: True 时截整页(含滚动区域),默认只截当前视口。
width: 视口宽度(像素);不传时取 device 预设(desktop 1280 / mobile 390)。
height: 视口高度(像素);不传时取 device 预设(desktop 800 / mobile 844)。
wait_ms: 页面加载后额外等待的毫秒数,给动画/懒加载留时间。
selector: 截图前等待该 CSS 选择器出现,命中时按元素包围盒裁剪;
未命中或元素不可见时回退整页并在 notes 中说明。
hide: 截图前隐藏的元素选择器(如固定导航/弹窗);单个失败只写入 notes。
device: 设备预设 desktop / mobile;mobile 使用 390x844 视口、移动 UA 与触屏。
pdf: True 时导出整页 PDF(需 Chromium 内核),此时忽略元素裁剪与 full_page。
actions: 截图前按顺序执行的浏览器动作链(click/type/press/select/wait/scroll),
适合先展开菜单/搜索再截图;单个动作失败只写入 notes,不影响截图。
session: 登录态会话名(默认 default);需与 login 时使用的会话名一致。
deadline_ms: 整次调用的总预算(毫秒),不传表示不限。
proxy: 本次渲染使用的代理;不传则按代理池分配,未配池时沿用全局配置。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>"
},
"name": "web_screenshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| No | |||
| url | Yes | ||
| hide | No | ||
| path | No | ||
| proxy | No | ||
| width | No | ||
| device | No | ||
| height | No | ||
| actions | No | ||
| session | No | default | |
| wait_ms | No | ||
| selector | No | ||
| full_page | No | ||
| deadline_ms | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |