工具能力 | 工具名稱 | 工具描述 | 參數樣本 |
建立沙箱環境 | create_sandbox
| 建立一個新的AgentBay沙箱並返回其ID。 | {
"type": "object",
"properties": {},
"required": []
}
|
擷取沙箱訪問URL | get_sandbox_url
| 擷取無影MCP運行時URL的命令,供使用者訪問該運行時使用。每次擷取的URL僅單次有效,使用後立即失效。 | {
"type": "object",
"properties": {
"sandbox_id": {
"type": "string",
"title": "Sandbox Id",
"description": "The sandbox ID is the identifier for the tool execution environment. This sandbox_id comes from the create_sandbox tool."
}
},
"required": [
"sandbox_id"
]
}
|
全屏截圖並分享 | system_screenshot
| 捕獲當前螢幕的全屏截圖,並返回一個可共用的URL。截圖會自動被處理並安全儲存。出於安全考慮,產生的URL將在64分鐘後到期。 | {
"type": "object",
"properties": {
"sandbox_id": {
"type": "string",
"title": "Sandbox Id",
"description": "The sandbox ID is the identifier for the tool execution environment. This sandbox_id comes from the create_sandbox tool."
}
},
"required": [
"sandbox_id"
]
}
|
釋放沙箱資源 | kill_sandbox
| 任務完成後釋放資源。 | {
"type": "object",
"properties": {
"sandbox_id": {
"type": "string",
"title": "Sandbox Id",
"description": "The sandbox ID is the identifier for the tool execution environment. This sandbox_id comes from the create_sandbox tool."
}
},
"required": [
"sandbox_id"
]
}
|
執行Shell命令 | shell
| 執行 shell 命令並返回輸出或錯誤。 | {
"inputSchema": {
"properties": {
"command": {
"description": "用戶端輸入的命令",
"type": "string"
},
"timeout_ms": {
"default": 1000,
"description": "命令執行逾時時間(單位:毫秒)。如果未指定,預設值(例如 1000 毫秒)",
"type": "integer"
}
},
"required": ["command", "timeout_ms"],
"type": "object"
}
}
|
關閉瀏覽器頁面 | browser_close
| 關閉瀏覽器頁面 | {
"inputSchema": {
"type": "object",
"properties": {},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
}
|
調整瀏覽器視窗 | browser_resize
| 調整瀏覽器視窗大小 | {
"inputSchema": {
"type": "object",
"properties": {
"width": {
"type": "number",
"description": "瀏覽器視窗的寬度"
},
"height": {
"type": "number",
"description": "瀏覽器視窗的高度"
}
},
"required": ["width", "height"],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
}
|
擷取控制台訊息 | browser_console_messages
| 返回所有控制台訊息 | {
"inputSchema": {
"type": "object",
"properties": {},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
}
|
處理彈出對話方塊 | browser_handle_dialog
| 處理對話方塊 | {
"inputSchema": {
"type": "object",
"properties": {
"accept": {
"type": "boolean",
"description": "是否接受對話方塊。"
},
"promptText": {
"type": "string",
"description": "在提示對話方塊中的提示文本。"
}
},
"required": ["accept"],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
}
|
瀏覽器上傳檔案 | browser_file_upload
| 上傳一個或多個檔案 | {
"inputSchema": {
"type": "object",
"properties": {
"paths": {
"type": "array",
"items": {
"type": "string"
},
"description": "要上傳的檔案的絕對路徑。可以是單個檔案或多個檔案。"
}
},
"required": ["paths"],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
}
|
安裝瀏覽器 | browser_install
| 安裝配置中指定的瀏覽器。如果收到瀏覽器未安裝的錯誤,請調用此工具。 | {
"inputSchema": {
"type": "object",
"properties": {},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
}
|
瀏覽器按鍵動作 | browser_press_key
| 在鍵盤上按下按鍵 | {
"inputSchema": {
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "要按下的按鍵名稱或產生的字元,例如 `ArrowLeft` 或 `a`"
}
},
"required": ["key"],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
}
|
瀏覽器導航URL | browser_navigate
| 導航到 URL | {
"inputSchema": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "要導航到的 URL"
}
},
"required": ["url"],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
}
|
瀏覽器返回上一頁 | browser_navigate_back
| 返回到上一頁 | {
"inputSchema": {
"type": "object",
"properties": {},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
}
|
瀏覽器前進下一頁 | browser_navigate_forward
| 前進到下一頁 | {
"inputSchema": {
"type": "object",
"properties": {},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
}
|
擷取網路請求 | browser_network_requests
| 返回自載入頁面以來的所有網路請求 | {
"inputSchema": {
"type": "object",
"properties": {},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
}
|
頁面截圖 | browser_take_screenshot
| 截取當前頁面的螢幕截圖。不能基於截圖執行操作,需使用 browser_snapshot 進行操作。 | {
"inputSchema": {
"type": "object",
"properties": {
"raw": {
"type": "boolean",
"description": "是否以 PNG 格式返回無壓縮資料。預設值為 false,返回 JPEG 映像。"
},
"filename": {
"type": "string",
"description": "儲存截圖的檔案名稱。如果未指定,預設為 `page-{timestamp}.{png|jpeg}`。"
},
"element": {
"type": "string",
"description": "用於擷取截圖元素許可權的人類可讀元素描述。如果未提供,將截取視口。如果提供 element,必須同時提供 ref。"
},
"ref": {
"type": "string",
"description": "頁面快照中的目標元素引用。如果未提供,將截取視口。如果提供 ref,必須同時提供 element。"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
}
|
捕獲頁面快照 | browser_snapshot
| 捕獲當前頁面的可訪問性快照。 | {
"inputSchema": {
"type": "object",
"properties": {},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
}
|
瀏覽器點擊操作 | browser_click
| 在網頁上執行點擊操作 | {
"inputSchema": {
"type": "object",
"properties": {
"element": {
"type": "string",
"description": "用於擷取與元素互動許可權的人類可讀元素描述"
},
"ref": {
"type": "string",
"description": "頁面快照中的目標元素引用"
}
},
"required": ["element", "ref"],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
}
|
瀏覽器元素拖拽 | browser_drag
| 在兩個元素之間執行拖放操作 | {
"inputSchema": {
"type": "object",
"properties": {
"startElement": {
"type": "string",
"description": "用於擷取與源元素互動許可權的人類可讀元素描述"
},
"startRef": {
"type": "string",
"description": "頁面快照中的源元素引用"
},
"endElement": {
"type": "string",
"description": "用於擷取與目標元素互動許可權的人類可讀元素描述"
},
"endRef": {
"type": "string",
"description": "頁面快照中的目標元素引用"
}
},
"required": ["startElement", "startRef", "endElement", "endRef"],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
}
|
瀏覽器元素懸停 | browser_hover
| 滑鼠移至上方在頁面元素上 | {
"inputSchema": {
"type": "object",
"properties": {
"element": {
"type": "string",
"description": "用於擷取與元素互動許可權的人類可讀元素描述"
},
"ref": {
"type": "string",
"description": "頁面快照中的目標元素引用"
}
},
"required": ["element", "ref"],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
}
|
瀏覽器輸入文本 | browser_type
| 在可編輯元素中輸入文本 | {
"inputSchema": {
"type": "object",
"properties": {
"element": {
"type": "string",
"description": "用於擷取與元素互動許可權的人類可讀元素描述"
},
"ref": {
"type": "string",
"description": "頁面快照中的目標元素引用"
},
"text": {
"type": "string",
"description": "要輸入到元素中的文本"
},
"submit": {
"type": "boolean",
"description": "是否提交輸入的文本(輸入後按斷行符號)"
},
"slowly": {
"type": "boolean",
"description": "是否逐個字元輸入。這對於觸發頁面中的按鍵處理常式很有用。預設情況下整個文本一次性填充。"
}
},
"required": ["element", "ref", "text"],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
}
|
下拉式功能表選擇 | browser_select_option
| 在下拉式功能表中選擇一個選項 | {
"inputSchema": {
"type": "object",
"properties": {
"element": {
"type": "string",
"description": "用於擷取與元素互動許可權的人類可讀元素描述"
},
"ref": {
"type": "string",
"description": "頁面快照中的目標元素引用"
},
"values": {
"type": "array",
"items": {
"type": "string"
},
"description": "要在下拉式功能表中選擇的值數組。可以是單個值或多個值。"
}
},
"required": ["element", "ref", "values"],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
}
|
等待頁面內容 | browser_wait_for
| 等待文本出現或消失或指定時間過去 | {
"inputSchema": {
"type": "object",
"properties": {
"time": {
"type": "number",
"description": "等待的時間(秒)"
},
"text": {
"type": "string",
"description": "要等待的文本"
},
"textGone": {
"type": "string",
"description": "要等待消失的文本"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
}
|
建立目錄 | create_directory
| 建立一個新目錄或確保目錄存在。可以在一次操作中建立多個嵌套目錄。如果目錄已存在,此操作將靜默成功。非常適合設定專案所需的目錄結構或確保所需路徑存在。僅在允許的目錄中工作。 | {
"inputSchema": {
"properties": {
"path": {
"description": "要建立的目錄路徑。",
"type": "string"
}
},
"required": ["path"],
"type": "object"
}
}
|
基於行編輯檔案 | edit_file
| 對文字檔進行基於行的編輯。每次編輯會用新內容替換精確的行序列。返回 git 樣式的差異以顯示所做的更改。僅在允許的目錄中工作。 | {
"inputSchema": {
"properties": {
"dryRun": {
"default": false,
"description": "使用 git 樣式的差異格式預覽更改",
"type": "boolean"
},
"edits": {
"items": {
"properties": {
"newText": {
"description": "要替換的新文本",
"type": "string"
},
"oldText": {
"description": "要搜尋的文本 - 必須完全符合",
"type": "string"
}
},
"required": ["oldText", "newText"],
"type": "object"
},
"type": "array"
},
"path": {
"description": "要編輯的檔案路徑。",
"type": "string"
}
},
"required": ["path", "edits"],
"type": "object"
}
}
|
擷取檔案中繼資料 | get_file_info
| 檢索檔案或目錄的詳細中繼資料。返回包括大小、建立時間、最後修改時間、許可權和類型的綜合資訊。此工具非常適合在不讀取實際內容的情況下瞭解檔案特性。僅在允許的目錄中工作。 | {
"inputSchema": {
"properties": {
"path": {
"description": "要檢查的檔案或目錄路徑。",
"type": "string"
}
},
"required": ["path"],
"type": "object"
}
}
|
讀取檔案內容 | read_file
| 從檔案系統讀取檔案的內容。可以指定一個可選的 'offset'(以位元組為單位)來從特定位置開始讀取,以及一個可選的 'length'(以位元組為單位)來限制要讀取的位元組數。如果 'length' 被省略或為 0,檔案將讀取到末尾。處理各種文本編碼,並在檔案無法讀取時提供詳細的錯誤資訊。僅在允許的目錄中工作。 | {
"inputSchema": {
"properties": {
"length": {
"description": "要讀取的位元組數。如果省略或為 0,讀取到檔案末尾。",
"minimum": 0,
"type": "integer"
},
"offset": {
"default": 0,
"description": "從這個位元組位移量開始讀取。",
"minimum": 0,
"type": "integer"
},
"path": {
"description": "要讀取的檔案路徑。",
"type": "string"
}
},
"required": ["path"],
"type": "object"
}
}
|
批量讀取檔案 | read_multiple_files
| 同時讀取多個檔案的內容。這比逐個讀取檔案更高效,當你需要分析或比較多個檔案時。每個檔案的內容會以其路徑作為參考返回。單個檔案讀取失敗不會停止整個操作。僅在允許的目錄中工作。 | {
"inputSchema": {
"properties": {
"paths": {
"description": "要讀取的檔案路徑數組。",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": ["paths"],
"type": "object"
}
}
|
列出目錄檔案 | list_directory
| 擷取指定路徑中所有檔案和目錄的詳細列表。結果通過 [FILE] 和 [DIR] 首碼清楚地區分檔案和目錄。此工具對於瞭解目錄結構和尋找特定檔案非常實用。僅在允許的目錄中工作。 | {
"inputSchema": {
"properties": {
"path": {
"description": "要列出的目錄路徑。",
"type": "string"
}
},
"required": ["path"],
"type": "object"
}
}
|
移動或重新命名檔案 | move_file
| 移動或重新命名檔案和目錄。可以在一次操作中將檔案移動到不同目錄並重新命名。如果目標已存在,操作將失敗。可以在不同目錄之間工作,並可用於在同一目錄內進行簡單重新命名。源和目標都必須在允許的目錄中。 | {
"inputSchema": {
"properties": {
"destination": {
"description": "目標檔案或目錄路徑。",
"type": "string"
},
"source": {
"description": "源檔案或目錄路徑。",
"type": "string"
}
},
"required": ["source", "destination"],
"type": "object"
}
}
|
遞迴搜尋檔案 | search_files
| 遞迴搜尋匹配模式的檔案和目錄。從起始路徑搜尋所有子目錄。搜尋區分大小寫並匹配部分名稱。返回所有匹配項的完整路徑。非常適合在不知道確切位置時尋找檔案。僅在允許的目錄中搜尋。 | {
"inputSchema": {
"properties": {
"excludePatterns": {
"default": [],
"description": "要排除的模式(可選)。",
"items": {
"type": "string"
},
"type": "array"
},
"path": {
"description": "要開始搜尋的目錄路徑。",
"type": "string"
},
"pattern": {
"description": "要匹配的模式。",
"type": "string"
}
},
"required": ["path", "pattern"],
"type": "object"
}
}
|
寫入檔案內容 | write_file
| 建立一個新檔案或寫入現有檔案的內容。可以選擇完全覆蓋檔案或通過指定 mode參數追加到檔案末尾。使用 overwrite 模式(預設)在寫入前清除檔案,或使用 append模式將內容添加到檔案末尾。處理帶適當編碼的常值內容。僅在允許的目錄中工作。 | {
"inputSchema": {
"properties": {
"content": {
"description": "要寫入的內容。",
"type": "string"
},
"mode": {
"default": "overwrite",
"description": "寫入模式:'overwrite' 清除檔案,'append' 添加到檔案末尾。",
"enum": ["overwrite", "append"],
"type": "string"
},
"path": {
"description": "要寫入的檔案路徑。",
"type": "string"
}
},
"required": ["path", "content"],
"type": "object"
}
}
|
同步執行頁面操作 | page_use_act
| 在當前網頁上執行一個或多個操作,並阻塞直至所有操作完成。 該方法通過當前 Agent 立即執行所提供的操作,並在整個操作序列完成後返回最終結果。它能夠處理單個互動,也支援一系列連續操作。 | {
"type": "object",
"title": "page_use_actArguments",
"required": [
"sandbox_id",
"action"
],
"properties": {
"sandbox_id": {
"type": "string",
"title": "Sandbox Id",
"description": "The sandbox ID is the identifier for the tool execution environment. This sandbox_id comes from the create_sandbox tool."
},
"dom_settle_timeout_ms": {
"type": "integer",
"title": "Dom Settle Timeout Ms"
},
"page_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Page Id"
},
"variables": {
"additionalProperties": {
"type": "string"
},
"type": "object",
"title": "Variables"
},
"action": {
"type": "string",
"title": "Action"
},
"context_id": {
"default": 0,
"type": "integer",
"title": "Context Id"
},
"iframe": {
"type": "boolean",
"title": "Iframe"
},
"timeout_ms": {
"type": "integer",
"title": "Timeout Ms"
},
"use_vision": {
"default": false,
"type": "boolean",
"title": "Use Vision"
}
}
}
|
網頁截圖 | page_use_screenshot
| 捕獲當前網頁的螢幕截圖。 該工具提供靈活的截圖功能,支援整頁截圖、指定地區裁剪以及映像品質設定。結果以資料 URL 的形式返回(如data:image/png;base64等),可直接用於前端應用中。 | {
"type": "object",
"title": "page_use_screenshotArguments",
"properties": {
"sandbox_id": {
"type": "string",
"title": "Sandbox Id",
"description": "The sandbox ID is the identifier for the tool execution environment. This sandbox_id comes from the create_sandbox tool."
},
"page_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Page Id"
},
"full_page": {
"default": true,
"type": "boolean",
"title": "Full Page"
},
"context_id": {
"default": 0,
"type": "integer",
"title": "Context Id"
},
"clip": {
"additionalProperties": {
"type": "number"
},
"type": "object",
"title": "Clip"
},
"timeout": {
"type": "integer",
"title": "Timeout"
},
"quality": {
"default": 80,
"type": "integer",
"title": "Quality"
}
},
"required": [
"sandbox_id"
]
}
|
關閉瀏覽器會話 | page_use_close_session
| 關閉當前瀏覽器代理會話。 這將終止由代理管理的瀏覽器進程,並釋放相關資源。 | {
"type": "object",
"title": "page_use_close_sessionArguments",
"properties": {
"sandbox_id": {
"type": "string",
"title": "Sandbox Id",
"description": "The sandbox ID is the identifier for the tool execution environment. This sandbox_id comes from the create_sandbox tool."
}
},
"required": [
"sandbox_id"
]
}
|
尋找可互動元素 | page_use_observe
| 識別並定位可互動的使用者介面元素。 該工具可協助你發現和描述可進行互動的元素(例如按鈕或輸入框),以便在後續操作中使用。 當需要尋找可操作元素時,使用observe工具。 若需提取結構化資料或常值內容,則應優先使用extract工具。 | {
"type": "object",
"title": "page_use_observeArguments",
"required": [
"sandbox_id",
"instruction"
],
"properties": {
"sandbox_id": {
"type": "string",
"title": "Sandbox Id",
"description": "The sandbox ID is the identifier for the tool execution environment. This sandbox_id comes from the create_sandbox tool."
},
"dom_settle_timeout_ms": {
"type": "integer",
"title": "Dom Settle Timeout Ms"
},
"page_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Page Id"
},
"instruction": {
"type": "string",
"title": "Instruction"
},
"context_id": {
"default": 0,
"type": "integer",
"title": "Context Id"
},
"iframe": {
"default": false,
"type": "boolean",
"title": "Iframe"
},
"use_vision": {
"default": false,
"type": "boolean",
"title": "Use Vision"
}
}
}
|
非同步執行頁面操作 | page_use_act_async
| 在當前網頁上非同步開始執行一個或多個操作,並返回一個用於進度輪詢的 task_id。 與page_use_act不同,該方法不會阻塞直至操作完成。它會立即啟動執行,返回唯一的task_id,並允許用戶端通過page_use_get_act_result輪詢擷取中間進度和最終結果。 | {
"type": "object",
"title": "page_use_act_asyncArguments",
"required": [
"sandbox_id",
"action"
],
"properties": {
"sandbox_id": {
"type": "string",
"title": "Sandbox Id",
"description": "The sandbox ID is the identifier for the tool execution environment. This sandbox_id comes from the create_sandbox tool."
},
"dom_settle_timeout_ms": {
"type": "integer",
"title": "Dom Settle Timeout Ms"
},
"page_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Page Id"
},
"variables": {
"additionalProperties": {
"type": "string"
},
"type": "object",
"title": "Variables"
},
"action": {
"type": "string",
"title": "Action"
},
"context_id": {
"default": 0,
"type": "integer",
"title": "Context Id"
},
"iframe": {
"type": "boolean",
"title": "Iframe"
},
"timeout_ms": {
"type": "integer",
"title": "Timeout Ms"
},
"use_vision": {
"default": false,
"type": "boolean",
"title": "Use Vision"
}
}
}
|
擷取非同步作業任務進度 | page_use_get_act_result
| 擷取非同步作業任務的當前進度或最終結果。 該方法應配合之前調用page_use_act_async所獲得的task_id使用。它將返回任務的目前狀態,如果執行已完成(is_done),則包含相應的結果內容。 | {
"type": "object",
"title": "page_use_get_act_resultArguments",
"required": [
"sandbox_id",
"task_id"
],
"properties": {
"sandbox_id": {
"type": "string",
"title": "Sandbox Id",
"description": "The sandbox ID is the identifier for the tool execution environment. This sandbox_id comes from the create_sandbox tool."
},
"task_id": {
"type": "string",
"title": "Task Id"
}
}
}
|
擷取非同步提取任務結果 | page_use_get_extract_result
| 非同步函數,用於擷取 extract 任務的結果。 | {
"type": "object",
"title": "page_use_get_extract_resultArguments",
"required": [
"sandbox_id",
"task_id"
],
"properties": {
"sandbox_id": {
"type": "string",
"title": "Sandbox Id",
"description": "The sandbox ID is the identifier for the tool execution environment. This sandbox_id comes from the create_sandbox tool."
},
"task_id": {
"type": "string",
"title": "Task Id"
}
}
}
|
頁面導航URL | page_use_navigate
| 在瀏覽器中導航至指定的 URL。 | {
"type": "object",
"title": "page_use_navigateArguments",
"required": [
"sandbox_id",
"url"
],
"properties": {
"sandbox_id": {
"type": "string",
"title": "Sandbox Id",
"description": "The sandbox ID is the identifier for the tool execution environment. This sandbox_id comes from the create_sandbox tool."
},
"url": {
"type": "string",
"title": "Url"
}
}
}
|
執行代碼 | run_code
| 在 Linux 平台上運行指定上下文中的代碼並返回輸出或錯誤。 | {
"inputSchema": {
"properties": {
"code": {
"description": "要執行的代碼",
"type": "string"
},
"language": {
"description": "用於代碼執行的程式設計語言。支援的值:'python', 'javascript'。如果未指定,預設使用 Python。",
"type": "string"
},
"timeout_s": {
"default": 300,
"description": "命令執行逾時時間(單位:秒)。如果未指定,預設值(例如 300 秒),最大 3600 秒。",
"type": "integer"
}
},
"required": ["code"],
"type": "object"
}
}
|