getScreenshot
Capture and save screenshots of web pages or specific elements, returning file paths for easy access. Supports PNG and JPEG formats, full-page captures, and custom clipping regions to meet varied screenshot needs.
Instructions
获取页面截图并保存到临时目录,返回文件路径
Input Schema
Name | Required | Description | Default |
---|---|---|---|
clip | No | 截图区域 | |
element | No | 元素选择器(截取特定元素) | |
fullPage | No | 全页面截图(默认true) | |
pageId | Yes | 页面ID | |
quality | No | JPEG质量(默认80) | |
type | No | 图片格式(默认png) |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"clip": {
"additionalProperties": false,
"description": "截图区域",
"properties": {
"height": {
"type": "number"
},
"width": {
"type": "number"
},
"x": {
"type": "number"
},
"y": {
"type": "number"
}
},
"required": [
"x",
"y",
"width",
"height"
],
"type": "object"
},
"element": {
"description": "元素选择器(截取特定元素)",
"type": "string"
},
"fullPage": {
"description": "全页面截图(默认true)",
"type": "boolean"
},
"pageId": {
"description": "页面ID",
"type": "string"
},
"quality": {
"description": "JPEG质量(默认80)",
"type": "number"
},
"type": {
"description": "图片格式(默认png)",
"enum": [
"png",
"jpeg"
],
"type": "string"
}
},
"required": [
"pageId"
],
"type": "object"
}