Computer Use Linux

开放能力概览

工具

名称

描述

支持说明

Playwright

browser_close

关闭页面

支持

browser_resize

调整浏览器窗口大小

支持

browser_console_messages

返回所有控制台消息

支持

browser_handle_dialog

处理对话框

支持

browser_file_upload

上传一个或多个文件

支持

browser_install

安装配置中指定的浏览器。如果收到浏览器未安装的错误,请调用此工具。

支持

browser_press_key

在键盘上按下按键

支持

browser_navigate

导航到 URL

支持

browser_navigate_back

返回到上一页

支持

browser_navigate_forward

前进到下一页

支持

browser_network_requests

返回自加载页面以来的所有网络请求

支持

browser_pdf_save

将页面保存为 PDF

支持

browser_take_screenshot

截取当前页面的屏幕截图。不能基于截图执行操作,需使用 browser_snapshot 进行操作。

支持

browser_snapshot

捕获当前页面的可访问性快照。

支持

browser_click

在网页上执行点击操作

支持

browser_drag

在两个元素之间执行拖放操作

支持

browser_hover

鼠标悬停在页面元素上

支持

browser_type

在可编辑元素中输入文本

支持

browser_select_option

在下拉菜单中选择一个选项

支持

browser_tab_list

列出浏览器标签页

支持

browser_tab_new

打开一个新标签页

支持

browser_tab_select

通过索引选择标签页

支持

browser_tab_close

关闭一个标签页

支持

browser_generate_playwright_test

为指定场景生成 Playwright 测试

支持

browser_wait_for

等待文本出现或消失或指定时间过去

支持

OSS

oss_env_init

创建并初始化 OSS 环境变量,指定 endpoint、access key ID、access key secret、security token 和 region。临时安全凭证通过 STS(Security Token Service)获取,更多信息请参见使用STS临时访问凭证访问OSS

支持

oss_upload

将本地文件或目录上传到指定的 OSS Bucket。如果上传目录,会先压缩为 zip 文件再上传。可以指定 OSS 中的对象名称,若未指定,则默认使用文件或 zip 名称。

说明

使用此工具前必须调用 oss_env_init 工具初始化 OSS 环境变量。

支持

oss_download

从指定的 OSS Bucket 下载对象到本地路径。如果父目录不存在,会自动创建。如果目标文件已存在,会被覆盖。

说明

使用此工具前必须调用 oss_env_init 工具初始化 OSS 环境变量。

支持

oss_upload_annon

使用 HTTP PUT 将本地文件或目录上传到指定 URL。如果上传目录,会先压缩为 zip 文件再上传。如果目标已存在,会被覆盖

支持

oss_download_annon

从指定 URL 下载文件到本地路径。如果父目录不存在,会自动创建。如果目标文件已存在,会被覆盖

支持

Shell

command

客户端输入的命令。例如:pwd

支持

timeout_ms

命令执行超时时间(单位:毫秒)。如果未指定,则使用默认值(1000毫秒)。

支持

Application

get_installed_apps

检索系统中安装的应用程序列表。支持通过开始菜单条目和桌面快捷方式筛选,并可选择排除系统应用。返回应用程序详细信息,包括名称、启动命令、可选的停止命令和工作目录。启动命令可能包含占位符(例如:%F、%U),这些占位符遵循 Linux 标准桌面条目规则。在启动应用程序时,这些占位符应替换为适当的参数、文件路径或 URL。

支持

start_app

使用提供的命令和可选工作目录启动指定应用程序。返回与启动应用程序关联的进程列表,包括进程名称、PID 和启动命令。

支持

stop_app_by_pname

终止与指定进程名称关联的所有进程。请谨慎使用,因为这将强制终止指定进程。

支持

stop_app_by_pid

终止通过进程 ID 识别的特定进程。请谨慎使用,因为这将强制终止指定进程。

支持

stop_app_by_cmd

使用提供的停止命令终止应用程序。请谨慎使用,因为这将强制终止指定进程。

支持

list_visible_apps

列出所有具有可见窗口的应用程序,包括其关联的进程信息。返回具有可见窗口的进程列表,包括进程名称、PID 和启动命令。

支持

FileSystem

create_directory

创建一个新目录或确保目录存在。可以在一次操作中创建多个嵌套目录。如果目录已存在,此操作将静默成功。非常适合设置项目所需的目录结构或确保所需路径存在。

说明

仅在允许的目录中工作。

支持

edit_file

对文本文件进行基于行的编辑。每次编辑会用新内容替换精确的行序列。返回 git 样式的差异以显示所做的更改。

说明

仅在允许的目录中工作。

支持

get_file_info

检索文件或目录的详细元数据。返回包括大小、创建时间、最后修改时间、权限和类型的综合信息。此工具非常适合在不读取实际内容的情况下了解文件特性。

说明

仅在允许的目录中工作。

支持

read_file

从文件系统读取文件的内容。可以指定一个可选的offset(以字节为单位)来从特定位置开始读取,以及一个可选的length(以字节为单位)来限制要读取的字节数。如果 length 被省略或为 0,文件将读取到末尾。处理各种文本编码,并在文件无法读取时提供详细的错误信息。

说明

仅在允许的目录中工作。

支持

read_multiple_files

同时读取多个文件的内容。这比逐个读取文件更高效,当你需要分析或比较多个文件时。每个文件的内容会以其路径作为参考返回。单个文件读取失败不会停止整个操作。

说明

仅在允许的目录中工作。

支持

list_directory

获取指定路径中所有文件和目录的详细列表。结果通过 [FILE] 和 [DIR] 前缀清楚地区分文件和目录。此工具对于了解目录结构和查找特定文件非常有用。

说明

仅在允许的目录中工作。

支持

move_file

移动或重命名文件和目录。可以在一次操作中移动文件到不同目录并重命名。如果目标已存在,操作将失败。可以在不同目录之间工作,并可用于在同一目录内进行简单重命名。

说明

源和目标都必须在允许的目录中。

支持

search_files

递归搜索匹配模式的文件和目录。从起始路径搜索所有子目录。搜索区分大小写并匹配部分名称。返回所有匹配项的完整路径。非常适合在不知道确切位置时查找文件。

说明

仅在允许的目录中搜索。

支持

write_file

创建一个新文件或写入现有文件的内容。可以选择完全覆盖文件或通过指定mode 参数追加到文件末尾。使用overwrite模式(默认)在写入前清除文件,或使用 append 模式将内容添加到文件末尾。处理带适当编码的文本内容。

说明

仅在允许的目录中工作。

支持

UI

list_root_windows

列出所有根窗口及其相关的信息。返回根窗口列表,包括窗口 ID、窗口标题、进程 ID 和进程名称。

支持

get_active_window

检索当前活动窗口的信息。返回包括窗口 ID、标题、进程 ID (pid) 和进程名称 (pname) 的详细信息。

支持

activate_window

通过窗口 ID 激活特定窗口。

支持

maximize_window

通过窗口 ID 最大化特定窗口。

支持

minimize_window

通过窗口 ID 最小化特定窗口。

支持

restore_window

通过窗口 ID 将特定窗口恢复到正常状态。

支持

close_window

通过窗口 ID 关闭特定窗口。

支持

resize_window

通过窗口 ID 调整特定窗口的大小。

支持

fullscreen_window

通过窗口 ID 将特定窗口设置为全屏模式。

支持

focus_mode

启用或禁用焦点模式。启用焦点模式后,只有当前活动进程及其子进程的窗口可以保留在前台。其他进程尝试将其窗口带到前台时,这些窗口将被关闭。

支持

Playwright

Playwright 集凭借其精细化的浏览器控制、丰富的元素交互能力及全面的调试支持,为开发者和测试人员提供了端到端的自动化解决方案。其模块化设计允许灵活组合各类工具,能够涵盖从简单页面操作到复杂测试场景的各项需求,为高效构建和验证现代Web应用测试流程提供关键支撑。

名称

描述

参数

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#"
  }
}

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_pdf_save

将页面保存为 PDF

{
  "inputSchema": {
    "type": "object",
    "properties": {
      "filename": {
        "type": "string",
        "description": "保存 PDF 的文件名。如果未指定,默认为 `page-{timestamp}.pdf`。"
      }
    },
    "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_tab_list

列出浏览器标签页

{
  "inputSchema": {
    "type": "object",
    "properties": {},
    "additionalProperties": false,
    "$schema": "http://json-schema.org/draft-07/schema#"
  }
}

browser_tab_new

打开一个新标签页

{
  "inputSchema": {
    "type": "object",
    "properties": {
      "url": {
        "type": "string",
        "description": "新标签页中要导航到的 URL。如果未提供,新标签页将为空白。"
      }
    },
    "additionalProperties": false,
    "$schema": "http://json-schema.org/draft-07/schema#"
  }
}

browser_tab_select

通过索引选择标签页

{
  "inputSchema": {
    "type": "object",
    "properties": {
      "index": {
        "type": "number",
        "description": "要选择的标签页索引"
      }
    },
    "required": ["index"],
    "additionalProperties": false,
    "$schema": "http://json-schema.org/draft-07/schema#"
  }
}

browser_tab_close

关闭一个标签页

{
  "inputSchema": {
    "type": "object",
    "properties": {
      "index": {
        "type": "number",
        "description": "要关闭的标签页索引。如果未提供,关闭当前标签页。"
      }
    },
    "additionalProperties": false,
    "$schema": "http://json-schema.org/draft-07/schema#"
  }
}

browser_generate_playwright_test

为特定场景生成 Playwright 测试

{
  "inputSchema": {
    "type": "object",
    "properties": {
      "name": {
        "type": "string",
        "description": "测试的名称"
      },
      "description": {
        "type": "string",
        "description": "测试的描述"
      },
      "steps": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "测试的步骤"
      }
    },
    "required": ["name", "description", "steps"],
    "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#"
  }
}

OSS

OSS通过STS临时凭证认证和匿名URL操作两种模式,支持开发者在不同权限场景下灵活操作OSS存储资源。标准工具依赖环境初始化以确保安全性,而匿名工具则简化了临时或公开资源的访问流程。

名称

描述

参数

oss_env_init

创建并初始化 OSS 环境变量,指定 endpoint、access key ID、access key secret、security token 和 region。临时安全凭证通过 STS(Security Token Service)获取,更多信息请参见使用STS临时访问凭证访问OSS

{
  "inputSchema": {
    "properties": {
      "access_key_id": {
        "description": "OSS 身份验证的访问密钥 ID",
        "type": "string"
      },
      "access_key_secret": {
        "description": "OSS 身份验证的访问密钥 Secret",
        "type": "string"
      },
      "endpoint": {
        "description": "OSS 服务端点,例如:若未指定,默认为 https://oss-cn-hangzhou.aliyuncs.com",
        "type": "string"
      },
      "region": {
        "description": "OSS 区域,例如:cn-hangzhou。若未指定,默认为 cn-hangzhou",
        "type": "string"
      },
      "security_token": {
        "description": "OSS 身份验证的安全令牌",
        "type": "string"
      }
    },
    "required": ["access_key_id", "access_key_secret", "security_token"],
    "type": "object"
  }
}

oss_upload

将本地文件或目录上传到指定的 OSS Bucket。如果上传目录,会先压缩为 zip 文件再上传。可以指定 OSS 中的对象名称,若未指定,则默认使用文件或 zip 名称。

说明

使用此工具前必须调用 oss_env_init 工具初始化 OSS 环境变量。

{
  "inputSchema": {
    "properties": {
      "bucket": {
        "description": "OSS Bucket 名称",
        "type": "string"
      },
      "object": {
        "description": "OSS Bucket 中的对象路径,例如:test/test.txt",
        "type": "string"
      },
      "path": {
        "description": "要上传的本地文件或非空目录的完整路径,例如:/tmp/test.txt /tmp(Linux)或 C:/tmp/test.txt C:/tmp(Windows)",
        "type": "string"
      }
    },
    "required": ["bucket", "object", "path"],
    "type": "object"
  }
}

oss_download

从指定的 OSS Bucket 下载对象到本地路径。如果父目录不存在,会自动创建。如果目标文件已存在,会被覆盖。

说明

使用此工具前必须调用 oss_env_init 工具初始化 OSS 环境变量。

{
  "inputSchema": {
    "properties": {
      "bucket": {
        "description": "OSS Bucket 名称",
        "type": "string"
      },
      "object": {
        "description": "OSS Bucket 中的对象路径,例如:test/test.txt",
        "type": "string"
      },
      "path": {
        "description": "保存下载文件的本地完整路径,例如:/tmp/test.txt(Linux)或 C:/tmp/test.txt(Windows)",
        "type": "string"
      }
    },
    "required": ["bucket", "object", "path"],
    "type": "object"
  }
}

oss_upload_annon

使用 HTTP PUT 将本地文件或目录上传到指定 URL。如果上传目录,会先压缩为 zip 文件再上传。如果目标已存在,会被覆盖

{
  "inputSchema": {
    "properties": {
      "path": {
        "description": "要上传的本地文件或非空目录的完整路径,例如:/tmp/test.txt /tmp(Linux)或 C:/tmp/test.txt  C:/tmp(Windows)",
        "type": "string"
      },
      "url": {
        "description": "上传文件的 HTTP/HTTPS URL",
        "type": "string"
      }
    },
    "required": ["url", "path"],
    "type": "object"
  }
}

oss_download_annon

从指定 URL 下载文件到本地路径。如果父目录不存在,会自动创建。如果目标文件已存在,会被覆盖

{
  "inputSchema": {
    "properties": {
      "path": {
        "description": "保存下载文件的本地完整路径,例如:/tmp/test.txt(Linux)或 C:/tmp/test.txt(Windows)",
        "type": "string"
      },
      "url": {
        "description": "下载文件的 HTTP/HTTPS URL",
        "type": "string"
      }
    },
    "required": ["url", "path"],
    "type": "object"
  }
}

Shell

shell 可以用于在Linux平台上中执行终端命令,并在超时后返回输出或错误。

名称

描述

参数

command

客户端输入的命令。例如:pwd

{
  "inputSchema": {
    "properties": {
      "command": {
        "description": "客户端输入的命令",
        "type": "string"
      },
      "timeout_ms": {
        "default": 1000,
        "description": "命令执行超时时间(单位:毫秒)。如果未指定,默认值(例如 1000 毫秒)",
        "type": "integer"
      }
    },
    "required": ["command", "timeout_ms"],
    "type": "object"
  }
}

timeout_ms

命令执行超时时间(单位:毫秒)。如果未指定,则使用默认值(1000毫秒)。

Application

Application工具提供了应用程序管理的核心功能,从应用的发现、启动到停止操作,涵盖了完整的应用生命周期管理。

名称

描述

参数

get_installed_apps

检索系统中安装的应用程序列表。支持通过开始菜单条目和桌面快捷方式筛选,并可选择排除系统应用。返回应用程序详细信息,包括名称、启动命令、可选的停止命令和工作目录。启动命令可能包含占位符(例如:%F、%U),这些占位符遵循 Linux 标准桌面条目规则。在启动应用程序时,这些占位符应替换为适当的参数、文件路径或 URL。

{
  "inputSchema": {
    "properties": {
      "desktop": {
        "default": false,
        "description": "包含桌面快捷方式(默认:false)",
        "type": "boolean"
      },
      "ignore_system_app": {
        "default": true,
        "description": "排除系统应用(默认:true)",
        "type": "boolean"
      },
      "start_menu": {
        "default": true,
        "description": "包含开始菜单应用(默认:true)",
        "type": "boolean"
      }
    },
    "required": [],
    "type": "object"
  }
}

start_app

使用提供的命令和可选工作目录启动指定应用程序。返回与启动应用程序关联的进程列表,包括进程名称、PID 和启动命令。

{
  "inputSchema": {
    "properties": {
      "activity": {
        "description": "Android 上的活动名称,例如 com.xxActivity 或 com.xx/com.xxActivity。",
        "type": "string"
      },
      "start_cmd": {
        "description": "启动应用程序的命令。这可以包含 %F(文件路径)或 %U(URL/文件路径)等占位符,这些占位符在执行前必须替换为实际值。",
        "type": "string"
      },
      "work_directory": {
        "default": "",
        "description": "启动应用程序的工作目录。如果省略,将使用默认目录。",
        "type": "string"
      }
    },
    "required": ["start_cmd"],
    "type": "object"
  }
}

stop_app_by_pname

终止与指定进程名称关联的所有进程。请谨慎使用,因为这将强制终止指定进程。

{
  "inputSchema": {
    "properties": {
      "pname": {
        "description": "要终止的进程名称。",
        "type": "string"
      }
    },
    "required": ["pname"],
    "type": "object"
  }
}

stop_app_by_pid

终止通过进程 ID 识别的特定进程。请谨慎使用,因为这将强制终止指定进程。

{
  "inputSchema": {
    "properties": {
      "pid": {
        "description": "要终止的进程的进程 ID。",
        "type": "integer"
      }
    },
    "required": ["pid"],
    "type": "object"
  }
}

stop_app_by_cmd

使用提供的停止命令终止应用程序。请谨慎使用,因为这将强制终止指定进程。

{
  "inputSchema": {
    "properties": {
      "stop_cmd": {
        "description": "用于终止应用程序的命令。",
        "type": "string"
      }
    },
    "required": ["stop_cmd"],
    "type": "object"
  }
}

list_visible_apps

列出所有具有可见窗口的应用程序,包括其关联的进程信息。返回具有可见窗口的进程列表,包括进程名称、PID 和启动命令。

{
  "inputSchema": {
    "properties": {},
    "required": [],
    "type": "object"
  }
}

FileSystem

FileSystem 可以通过MCP协议为Agent提供安全的文件操作能力。支持文件读写、目录结构管理、跨路径搜索、元数据查询等核心功能。通过沙箱化路径权限控制,可在限定范围内执行安全可靠的文件操作,提供精准内容编辑模式与试运行验证机制,适用于自动化文件管理场景。

名称

描述

参数

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"
  }
}

UI

UI 主要用于窗口管理,提供一系列操作,以增强用户在图形用户界面(GUI)环境中的体验与控制能力。其功能主要集中在窗口信息检索、窗口操作、窗口调整以及专注模式管理。

名称

描述

参数

list_root_windows

列出所有根窗口及其相关的信息。返回根窗口列表,包括窗口 ID、窗口标题、进程 ID 和进程名称。

{
  "inputSchema": {
    "properties": {},
    "required": [],
    "type": "object"
  }
}

get_active_window

检索当前活动窗口的信息。返回包括窗口 ID、标题、进程 ID (pid) 和进程名称 (pname) 的详细信息。

{
  "inputSchema": {
    "properties": {},
    "required": [],
    "type": "object"
  }
}

activate_window

通过窗口 ID 激活特定窗口。

{
  "inputSchema": {
    "properties": {
      "window_id": {
        "description": "要激活的窗口的唯一标识符。",
        "type": "integer"
      }
    },
    "required": ["window_id"],
    "type": "object"
  }
}

maximize_window

通过窗口 ID 最大化特定窗口。

{
  "inputSchema": {
    "properties": {
      "window_id": {
        "description": "要最大化的窗口的唯一标识符。",
        "type": "integer"
      }
    },
    "required": ["window_id"],
    "type": "object"
  }
}

minimize_window

通过窗口 ID 最小化特定窗口。

{
  "inputSchema": {
    "properties": {
      "window_id": {
        "description": "要最小化的窗口的唯一标识符。",
        "type": "integer"
      }
    },
    "required": ["window_id"],
    "type": "object"
  }
}

restore_window

通过窗口 ID 将特定窗口恢复到正常状态。

{
  "inputSchema": {
    "properties": {
      "window_id": {
        "description": "要恢复的窗口的唯一标识符。",
        "type": "integer"
      }
    },
    "required": ["window_id"],
    "type": "object"
  }
}

close_window

通过窗口 ID 关闭特定窗口。

{
  "inputSchema": {
    "properties": {
      "window_id": {
        "description": "要关闭的窗口的唯一标识符。",
        "type": "integer"
      }
    },
    "required": ["window_id"],
    "type": "object"
  }
}

resize_window

通过窗口 ID 调整特定窗口的大小。

{
  "inputSchema": {
    "properties": {
      "height": {
        "description": "窗口的新高度(以像素为单位)。",
        "type": "integer"
      },
      "width": {
        "description": "窗口的新宽度(以像素为单位)。",
        "type": "integer"
      },
      "window_id": {
        "description": "要调整大小的窗口的唯一标识符。",
        "type": "integer"
      }
    },
    "required": ["window_id", "width", "height"],
    "type": "object"
  }
}

fullscreen_window

通过窗口 ID 将特定窗口设置为全屏模式。

{
  "inputSchema": {
    "properties": {
      "window_id": {
        "description": "要设置为全屏的窗口的唯一标识符。",
        "type": "integer"
      }
    },
    "required": ["window_id"],
    "type": "object"
  }
}

focus_mode

启用或禁用焦点模式。启用焦点模式后,只有当前活动进程及其子进程的窗口可以保留在前台。其他进程尝试将其窗口带到前台时,这些窗口将被关闭。

{
  "inputSchema": {
    "properties": {
      "on": {
        "description": "是否启用(true)或禁用(false)焦点模式。",
        "type": "boolean"
      }
    },
    "required": ["on"],
    "type": "object"
  }
}

MCP Tool List

{
    "playwright": {
        "tools": [
            {
                "name": "browser_close",
                "description": "Close the page",
                "inputSchema": {
                    "type": "object",
                    "properties": {

                    },
                    "additionalProperties": false,
                    "$schema": "http://json-schema.org/draft-07/schema#"
                }
            },
            {
                "name": "browser_resize",
                "description": "Resize the browser window",
                "inputSchema": {
                    "type": "object",
                    "properties": {
                        "width": {
                            "type": "number",
                            "description": "Width of the browser window"
                        },
                        "height": {
                            "type": "number",
                            "description": "Height of the browser window"
                        }
                    },
                    "required": [
                        "width",
                        "height"
                    ],
                    "additionalProperties": false,
                    "$schema": "http://json-schema.org/draft-07/schema#"
                }
            },
            {
                "name": "browser_console_messages",
                "description": "Returns all console messages",
                "inputSchema": {
                    "type": "object",
                    "properties": {

                    },
                    "additionalProperties": false,
                    "$schema": "http://json-schema.org/draft-07/schema#"
                }
            },
            {
                "name": "browser_handle_dialog",
                "description": "Handle a dialog",
                "inputSchema": {
                    "type": "object",
                    "properties": {
                        "accept": {
                            "type": "boolean",
                            "description": "Whether to accept the dialog."
                        },
                        "promptText": {
                            "type": "string",
                            "description": "The text of the prompt in case of a prompt dialog."
                        }
                    },
                    "required": [
                        "accept"
                    ],
                    "additionalProperties": false,
                    "$schema": "http://json-schema.org/draft-07/schema#"
                }
            },
            {
                "name": "browser_file_upload",
                "description": "Upload one or multiple files",
                "inputSchema": {
                    "type": "object",
                    "properties": {
                        "paths": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            },
                            "description": "The absolute paths to the files to upload. Can be a single file or multiple files."
                        }
                    },
                    "required": [
                        "paths"
                    ],
                    "additionalProperties": false,
                    "$schema": "http://json-schema.org/draft-07/schema#"
                }
            },
            {
                "name": "browser_install",
                "description": "Install the browser specified in the config. Call this if you get an error about the browser not being installed.",
                "inputSchema": {
                    "type": "object",
                    "properties": {

                    },
                    "additionalProperties": false,
                    "$schema": "http://json-schema.org/draft-07/schema#"
                }
            },
            {
                "name": "browser_press_key",
                "description": "Press a key on the keyboard",
                "inputSchema": {
                    "type": "object",
                    "properties": {
                        "key": {
                            "type": "string",
                            "description": "Name of the key to press or a character to generate, such as `ArrowLeft` or `a`"
                        }
                    },
                    "required": [
                        "key"
                    ],
                    "additionalProperties": false,
                    "$schema": "http://json-schema.org/draft-07/schema#"
                }
            },
            {
                "name": "browser_navigate",
                "description": "Navigate to a URL",
                "inputSchema": {
                    "type": "object",
                    "properties": {
                        "url": {
                            "type": "string",
                            "description": "The URL to navigate to"
                        }
                    },
                    "required": [
                        "url"
                    ],
                    "additionalProperties": false,
                    "$schema": "http://json-schema.org/draft-07/schema#"
                }
            },
            {
                "name": "browser_navigate_back",
                "description": "Go back to the previous page",
                "inputSchema": {
                    "type": "object",
                    "properties": {

                    },
                    "additionalProperties": false,
                    "$schema": "http://json-schema.org/draft-07/schema#"
                }
            },
            {
                "name": "browser_navigate_forward",
                "description": "Go forward to the next page",
                "inputSchema": {
                    "type": "object",
                    "properties": {

                    },
                    "additionalProperties": false,
                    "$schema": "http://json-schema.org/draft-07/schema#"
                }
            },
            {
                "name": "browser_network_requests",
                "description": "Returns all network requests since loading the page",
                "inputSchema": {
                    "type": "object",
                    "properties": {

                    },
                    "additionalProperties": false,
                    "$schema": "http://json-schema.org/draft-07/schema#"
                }
            },
            {
                "name": "browser_pdf_save",
                "description": "Save page as PDF",
                "inputSchema": {
                    "type": "object",
                    "properties": {
                        "filename": {
                            "type": "string",
                            "description": "File name to save the pdf to. Defaults to `page-{timestamp}.pdf` if not specified."
                        }
                    },
                    "additionalProperties": false,
                    "$schema": "http://json-schema.org/draft-07/schema#"
                }
            },
            {
                "name": "browser_take_screenshot",
                "description": "Take a screenshot of the current page. You can't perform actions based on the screenshot, use browser_snapshot for actions.",
                "inputSchema": {
                    "type": "object",
                    "properties": {
                        "raw": {
                            "type": "boolean",
                            "description": "Whether to return without compression (in PNG format). Default is false, which returns a JPEG image."
                        },
                        "filename": {
                            "type": "string",
                            "description": "File name to save the screenshot to. Defaults to `page-{timestamp}.{png|jpeg}` if not specified."
                        },
                        "element": {
                            "type": "string",
                            "description": "Human-readable element description used to obtain permission to screenshot the element. If not provided, the screenshot will be taken of viewport. If element is provided, ref must be provided too."
                        },
                        "ref": {
                            "type": "string",
                            "description": "Exact target element reference from the page snapshot. If not provided, the screenshot will be taken of viewport. If ref is provided, element must be provided too."
                        }
                    },
                    "additionalProperties": false,
                    "$schema": "http://json-schema.org/draft-07/schema#"
                }
            },
            {
                "name": "browser_snapshot",
                "description": "Capture accessibility snapshot of the current page, this is better than screenshot",
                "inputSchema": {
                    "type": "object",
                    "properties": {

                    },
                    "additionalProperties": false,
                    "$schema": "http://json-schema.org/draft-07/schema#"
                }
            },
            {
                "name": "browser_click",
                "description": "Perform click on a web page",
                "inputSchema": {
                    "type": "object",
                    "properties": {
                        "element": {
                            "type": "string",
                            "description": "Human-readable element description used to obtain permission to interact with the element"
                        },
                        "ref": {
                            "type": "string",
                            "description": "Exact target element reference from the page snapshot"
                        }
                    },
                    "required": [
                        "element",
                        "ref"
                    ],
                    "additionalProperties": false,
                    "$schema": "http://json-schema.org/draft-07/schema#"
                }
            },
            {
                "name": "browser_drag",
                "description": "Perform drag and drop between two elements",
                "inputSchema": {
                    "type": "object",
                    "properties": {
                        "startElement": {
                            "type": "string",
                            "description": "Human-readable source element description used to obtain the permission to interact with the element"
                        },
                        "startRef": {
                            "type": "string",
                            "description": "Exact source element reference from the page snapshot"
                        },
                        "endElement": {
                            "type": "string",
                            "description": "Human-readable target element description used to obtain the permission to interact with the element"
                        },
                        "endRef": {
                            "type": "string",
                            "description": "Exact target element reference from the page snapshot"
                        }
                    },
                    "required": [
                        "startElement",
                        "startRef",
                        "endElement",
                        "endRef"
                    ],
                    "additionalProperties": false,
                    "$schema": "http://json-schema.org/draft-07/schema#"
                }
            },
            {
                "name": "browser_hover",
                "description": "Hover over element on page",
                "inputSchema": {
                    "type": "object",
                    "properties": {
                        "element": {
                            "type": "string",
                            "description": "Human-readable element description used to obtain permission to interact with the element"
                        },
                        "ref": {
                            "type": "string",
                            "description": "Exact target element reference from the page snapshot"
                        }
                    },
                    "required": [
                        "element",
                        "ref"
                    ],
                    "additionalProperties": false,
                    "$schema": "http://json-schema.org/draft-07/schema#"
                }
            },
            {
                "name": "browser_type",
                "description": "Type text into editable element",
                "inputSchema": {
                    "type": "object",
                    "properties": {
                        "element": {
                            "type": "string",
                            "description": "Human-readable element description used to obtain permission to interact with the element"
                        },
                        "ref": {
                            "type": "string",
                            "description": "Exact target element reference from the page snapshot"
                        },
                        "text": {
                            "type": "string",
                            "description": "Text to type into the element"
                        },
                        "submit": {
                            "type": "boolean",
                            "description": "Whether to submit entered text (press Enter after)"
                        },
                        "slowly": {
                            "type": "boolean",
                            "description": "Whether to type one character at a time. Useful for triggering key handlers in the page. By default entire text is filled in at once."
                        }
                    },
                    "required": [
                        "element",
                        "ref",
                        "text"
                    ],
                    "additionalProperties": false,
                    "$schema": "http://json-schema.org/draft-07/schema#"
                }
            },
            {
                "name": "browser_select_option",
                "description": "Select an option in a dropdown",
                "inputSchema": {
                    "type": "object",
                    "properties": {
                        "element": {
                            "type": "string",
                            "description": "Human-readable element description used to obtain permission to interact with the element"
                        },
                        "ref": {
                            "type": "string",
                            "description": "Exact target element reference from the page snapshot"
                        },
                        "values": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            },
                            "description": "Array of values to select in the dropdown. This can be a single value or multiple values."
                        }
                    },
                    "required": [
                        "element",
                        "ref",
                        "values"
                    ],
                    "additionalProperties": false,
                    "$schema": "http://json-schema.org/draft-07/schema#"
                }
            },
            {
                "name": "browser_tab_list",
                "description": "List browser tabs",
                "inputSchema": {
                    "type": "object",
                    "properties": {

                    },
                    "additionalProperties": false,
                    "$schema": "http://json-schema.org/draft-07/schema#"
                }
            },
            {
                "name": "browser_tab_new",
                "description": "Open a new tab",
                "inputSchema": {
                    "type": "object",
                    "properties": {
                        "url": {
                            "type": "string",
                            "description": "The URL to navigate to in the new tab. If not provided, the new tab will be blank."
                        }
                    },
                    "additionalProperties": false,
                    "$schema": "http://json-schema.org/draft-07/schema#"
                }
            },
            {
                "name": "browser_tab_select",
                "description": "Select a tab by index",
                "inputSchema": {
                    "type": "object",
                    "properties": {
                        "index": {
                            "type": "number",
                            "description": "The index of the tab to select"
                        }
                    },
                    "required": [
                        "index"
                    ],
                    "additionalProperties": false,
                    "$schema": "http://json-schema.org/draft-07/schema#"
                }
            },
            {
                "name": "browser_tab_close",
                "description": "Close a tab",
                "inputSchema": {
                    "type": "object",
                    "properties": {
                        "index": {
                            "type": "number",
                            "description": "The index of the tab to close. Closes current tab if not provided."
                        }
                    },
                    "additionalProperties": false,
                    "$schema": "http://json-schema.org/draft-07/schema#"
                }
            },
            {
                "name": "browser_generate_playwright_test",
                "description": "Generate a Playwright test for given scenario",
                "inputSchema": {
                    "type": "object",
                    "properties": {
                        "name": {
                            "type": "string",
                            "description": "The name of the test"
                        },
                        "description": {
                            "type": "string",
                            "description": "The description of the test"
                        },
                        "steps": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            },
                            "description": "The steps of the test"
                        }
                    },
                    "required": [
                        "name",
                        "description",
                        "steps"
                    ],
                    "additionalProperties": false,
                    "$schema": "http://json-schema.org/draft-07/schema#"
                }
            },
            {
                "name": "browser_wait_for",
                "description": "Wait for text to appear or disappear or a specified time to pass",
                "inputSchema": {
                    "type": "object",
                    "properties": {
                        "time": {
                            "type": "number",
                            "description": "The time to wait in seconds"
                        },
                        "text": {
                            "type": "string",
                            "description": "The text to wait for"
                        },
                        "textGone": {
                            "type": "string",
                            "description": "The text to wait for to disappear"
                        }
                    },
                    "additionalProperties": false,
                    "$schema": "http://json-schema.org/draft-07/schema#"
                }
            }
        ]
    },
    "oss": {
        "tools": [
            {
                "name": "oss_env_init",
                "description": "Create and initialize OSS environment variables with the specified endpoint, access key ID, access key secret, security token, and region. The temporary security credentials obtained from the STS (Security Token Service). For more information, see: https://help.aliyun.com/zh/oss/developer-reference/use-temporary-access-credentials-provided-by-sts-to-access-oss?spm=a2c4g.11186623.help-menu-search-31815.d_1#9ab17afd7cs4t .",
                "inputSchema": {
                    "properties": {
                        "access_key_id": {
                            "description": "The Access Key ID for OSS authentication",
                            "type": "string"
                        },
                        "access_key_secret": {
                            "description": "The Access Key Secret for OSS authentication",
                            "type": "string"
                        },
                        "endpoint": {
                            "description": "The OSS service endpoint, e.g.,  If not specified, the default is https://oss-cn-hangzhou.aliyuncs.com",
                            "type": "string"
                        },
                        "region": {
                            "description": "The OSS region, e.g., cn-hangzhou. If not specified, the default is cn-hangzhou",
                            "type": "string"
                        },
                        "security_token": {
                            "description": "The Security Token for OSS authentication",
                            "type": "string"
                        }
                    },
                    "required": [
                        "access_key_id",
                        "access_key_secret",
                        "security_token"
                    ],
                    "type": "object"
                }
            },
            {
                "name": "oss_upload",
                "description": "Upload a local file or directory to the specified OSS bucket. If a directory is specified, it will be compressed into a zip file before uploading. The object name in OSS can be specified; if not, the file or zip name will be used by default. Note: You must call the oss_env_init tool to initialize OSS environment variables before using this tool.",
                "inputSchema": {
                    "properties": {
                        "bucket": {
                            "description": "OSS bucket name",
                            "type": "string"
                        },
                        "object": {
                            "description": "Object path in OSS bucket, e.g., test/test.txt",
                            "type": "string"
                        },
                        "path": {
                            "description": "Local file or not empty directory full path to upload, e.g., /tmp/test.txt /tmp on Linux or C:/tmp/test.txt C:/tmp on Windows",
                            "type": "string"
                        }
                    },
                    "required": [
                        "bucket",
                        "object",
                        "path"
                    ],
                    "type": "object"
                }
            },
            {
                "name": "oss_download",
                "description": "Download an object from the specified OSS bucket to the given local path. If the parent directory does not exist, it will be created automatically. If the target file already exists, it will be overwritten. Note: You must call the oss_env_init tool to initialize OSS environment variables before using this tool.",
                "inputSchema": {
                    "properties": {
                        "bucket": {
                            "description": "OSS bucket name",
                            "type": "string"
                        },
                        "object": {
                            "description": "Object path in OSS bucket, e.g., test/test.txt",
                            "type": "string"
                        },
                        "path": {
                            "description": "Local full path to save the downloaded file, e.g., /tmp/test.txt on Linux or C:/tmp/test.txt on Windows",
                            "type": "string"
                        }
                    },
                    "required": [
                        "bucket",
                        "object",
                        "path"
                    ],
                    "type": "object"
                }
            },
            {
                "name": "oss_upload_annon",
                "description": "Upload a local file or directory to the specified URL using HTTP PUT. If a directory is specified, it will be compressed into a zip file before uploading. If the upload target already exists, it will be overwritten.",
                "inputSchema": {
                    "properties": {
                        "path": {
                            "description": "Local file or not empty directory full path to upload, e.g., /tmp/test.txt /tmp on Linux or C:/tmp/test.txt  C:/tmp on Windows",
                            "type": "string"
                        },
                        "url": {
                            "description": "The HTTP/HTTPS URL to upload the file to",
                            "type": "string"
                        }
                    },
                    "required": [
                        "url",
                        "path"
                    ],
                    "type": "object"
                }
            },
            {
                "name": "oss_download_annon",
                "description": "Download a file from the specified URL to the given local path. If the parent directory does not exist, it will be created automatically. If the target file already exists, it will be overwritten.",
                "inputSchema": {
                    "properties": {
                        "path": {
                            "description": "The full local file path to save the downloaded file, e.g., /tmp/test.txt on Linux or C:/tmp/test.txt on Windows",
                            "type": "string"
                        },
                        "url": {
                            "description": "The HTTP/HTTPS URL to download the file from",
                            "type": "string"
                        }
                    },
                    "required": [
                        "url",
                        "path"
                    ],
                    "type": "object"
                }
            }
        ]
    },
    "shell": {
        "tools": [
            {
                "name": "shell",
                "description": "Executes an shell command with timeout and returns the output or an error on linux platform.",
                "inputSchema": {
                    "properties": {
                        "command": {
                            "description": "client input command",
                            "type": "string"
                        },
                        "timeout_ms": {
                            "default": 1000,
                            "description": "Command execution timeout (unit: milliseconds). If not specified, the default value (such as 1000 milliseconds) is used",
                            "type": "integer"
                        }
                    },
                    "required": [
                        "command",
                        "timeout_ms"
                    ],
                    "type": "object"
                }
            }
        ]
    },
    "application": {
        "tools": [
            {
                "name": "get_installed_apps",
                "description": "Retrieve a list of installed applications on the system. Supports filtering by Start Menu entries and Desktop shortcuts, with an option to exclude system applications. Returns application details including name, start command, optional stop command, and working directory. Start commands may include placeholders (e.g., %F, %U) that follow Linux standard desktop entry rules. These placeholders should be replaced with appropriate arguments, file paths, or URLs when starting the application.",
                "inputSchema": {
                    "properties": {
                        "desktop": {
                            "default": false,
                            "description": "Include Desktop shortcuts (default: false)",
                            "type": "boolean"
                        },
                        "ignore_system_app": {
                            "default": true,
                            "description": "Exclude system applications (default: true)",
                            "type": "boolean"
                        },
                        "start_menu": {
                            "default": true,
                            "description": "Include Start Menu applications (default: true)",
                            "type": "boolean"
                        }
                    },
                    "required": [

                    ],
                    "type": "object"
                }
            },
            {
                "name": "start_app",
                "description": "Start a specified application using the provided command and optional working directory. Returns a list of processes associated with the launched application, including their process names, PIDs, and startup commands.\n\n",
                "inputSchema": {
                    "properties": {
                        "activity": {
                            "description": "The activity name on android,like com.xxActivity or com.xx/com.xxActivity.",
                            "type": "string"
                        },
                        "start_cmd": {
                            "description": "The command to start the application. This can include placeholders like %F (file path) or %U (URL/file path), which must be replaced with actual values before execution.",
                            "type": "string"
                        },
                        "work_directory": {
                            "default": "",
                            "description": "The directory from which the application should be launched. If omitted, the default directory is used.",
                            "type": "string"
                        }
                    },
                    "required": [
                        "start_cmd"
                    ],
                    "type": "object"
                }
            },
            {
                "name": "stop_app_by_pname",
                "description": "Stop all processes associated with a specified process name. Use with caution as this will forcefully terminate the specified process.",
                "inputSchema": {
                    "properties": {
                        "pname": {
                            "description": "The name of the process to terminate.",
                            "type": "string"
                        }
                    },
                    "required": [
                        "pname"
                    ],
                    "type": "object"
                }
            },
            {
                "name": "stop_app_by_pid",
                "description": "Terminate a specific process identified by its Process ID. Use with caution as this will forcefully terminate the specified process.",
                "inputSchema": {
                    "properties": {
                        "pid": {
                            "description": "The Process ID of the process to terminate.",
                            "type": "integer"
                        }
                    },
                    "required": [
                        "pid"
                    ],
                    "type": "object"
                }
            },
            {
                "name": "stop_app_by_cmd",
                "description": "Terminate an application using the provided stop command. Use with caution as this will forcefully terminate the specified process.",
                "inputSchema": {
                    "properties": {
                        "stop_cmd": {
                            "description": "The command used to terminate the application.",
                            "type": "string"
                        }
                    },
                    "required": [
                        "stop_cmd"
                    ],
                    "type": "object"
                }
            },
            {
                "name": "list_visible_apps",
                "description": "List all applications with visible windows, including their associated process information. Returns a list of processes that have visible windows, including their process names, PIDs, and startup commands.",
                "inputSchema": {
                    "properties": {

                    },
                    "required": [

                    ],
                    "type": "object"
                }
            }
        ]
    },
    "filesystem": {
        "tools": [
            {
                "name": "create_directory",
                "description": "Create a new directory or ensure a directory exists. Can create multiple nested directories in one operation. If the directory already exists, this operation will succeed silently. Perfect for setting up directory structures for projects or ensuring required paths exist. Only works within allowed directories.",
                "inputSchema": {
                    "properties": {
                        "path": {
                            "description": "Directory path to create.",
                            "type": "string"
                        }
                    },
                    "required": [
                        "path"
                    ],
                    "type": "object"
                }
            },
            {
                "name": "edit_file",
                "description": "Make line-based edits to a text file. Each edit replaces exact line sequences with new content. Returns a git-style diff showing the changes made. Only works within allowed directories.",
                "inputSchema": {
                    "properties": {
                        "dryRun": {
                            "default": false,
                            "description": "Preview changes using git-style diff format",
                            "type": "boolean"
                        },
                        "edits": {
                            "items": {
                                "properties": {
                                    "newText": {
                                        "description": "Text to replace with",
                                        "type": "string"
                                    },
                                    "oldText": {
                                        "description": "Text to search for - must match exactly",
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "oldText",
                                    "newText"
                                ],
                                "type": "object"
                            },
                            "type": "array"
                        },
                        "path": {
                            "description": "File path to edit.",
                            "type": "string"
                        }
                    },
                    "required": [
                        "path",
                        "edits"
                    ],
                    "type": "object"
                }
            },
            {
                "name": "get_file_info",
                "description": "Retrieve detailed metadata about a file or directory. Returns comprehensive information including size, creation time, last modified time, permissions, and type. This tool is perfect for understanding file characteristics without reading the actual content. Only works within allowed directories.",
                "inputSchema": {
                    "properties": {
                        "path": {
                            "description": "File or directory path to inspect.",
                            "type": "string"
                        }
                    },
                    "required": [
                        "path"
                    ],
                    "type": "object"
                }
            },
            {
                "name": "read_file",
                "description": "Read the contents of a file from the file system. You can specify an optional 'offset' (in bytes) to start reading from a specific position, and an optional 'length' (in bytes) to limit how many bytes to read. If 'length' is omitted or 0, the file will be read to the end. Handles various text encodings and provides detailed error messages if the file cannot be read. Only works within allowed directories.",
                "inputSchema": {
                    "properties": {
                        "length": {
                            "description": "Number of bytes to read. If omitted or 0, read to end of file.",
                            "minimum": 0,
                            "type": "integer"
                        },
                        "offset": {
                            "default": 0,
                            "description": "Start reading from this byte offset.",
                            "minimum": 0,
                            "type": "integer"
                        },
                        "path": {
                            "description": "File path to read.",
                            "type": "string"
                        }
                    },
                    "required": [
                        "path"
                    ],
                    "type": "object"
                }
            },
            {
                "name": "read_multiple_files",
                "description": "Read the contents of multiple files simultaneously. This is more efficient than reading files one by one when you need to analyze or compare multiple files. Each file's content is returned with its path as a reference. Failed reads for individual files won't stop the entire operation. Only works within allowed directories.",
                "inputSchema": {
                    "properties": {
                        "paths": {
                            "description": "Array of file paths to read.",
                            "items": {
                                "type": "string"
                            },
                            "type": "array"
                        }
                    },
                    "required": [
                        "paths"
                    ],
                    "type": "object"
                }
            },
            {
                "name": "list_directory",
                "description": "Get a detailed listing of all files and directories in a specified path. Results clearly distinguish between files and directories with [FILE] and [DIR] prefixes. This tool is essential for understanding directory structure and finding specific files within a directory. Only works within allowed directories.",
                "inputSchema": {
                    "properties": {
                        "path": {
                            "description": "Directory path to list.",
                            "type": "string"
                        }
                    },
                    "required": [
                        "path"
                    ],
                    "type": "object"
                }
            },
            {
                "name": "move_file",
                "description": "Move or rename files and directories. Can move files between directories and rename them in a single operation. If the destination exists, the operation will fail. Works across different directories and can be used for simple renaming within the same directory. Both source and destination must be within allowed directories.",
                "inputSchema": {
                    "properties": {
                        "destination": {
                            "description": "Destination file or directory path.",
                            "type": "string"
                        },
                        "source": {
                            "description": "Source file or directory path.",
                            "type": "string"
                        }
                    },
                    "required": [
                        "source",
                        "destination"
                    ],
                    "type": "object"
                }
            },
            {
                "name": "search_files",
                "description": "Recursively search for files and directories matching a pattern. Searches through all subdirectories from the starting path. The search is case-sensitive and matches partial names. Returns full paths to all matching items. Great for finding files when you don't know their exact location. Only searches within allowed directories.",
                "inputSchema": {
                    "properties": {
                        "excludePatterns": {
                            "default": [

                            ],
                            "description": "Patterns to exclude (optional).",
                            "items": {
                                "type": "string"
                            },
                            "type": "array"
                        },
                        "path": {
                            "description": "Directory path to start search.",
                            "type": "string"
                        },
                        "pattern": {
                            "description": "Pattern to match.",
                            "type": "string"
                        }
                    },
                    "required": [
                        "path",
                        "pattern"
                    ],
                    "type": "object"
                }
            },
            {
                "name": "write_file",
                "description": "Create a new file or write content to an existing file. You can choose to completely overwrite the file or append to the end by specifying the 'mode' parameter. Use 'overwrite' mode (default) to clear the file before writing, or 'append' mode to add content to the end of the file. Handles text content with proper encoding. Only works within allowed directories.",
                "inputSchema": {
                    "properties": {
                        "content": {
                            "description": "Content to write.",
                            "type": "string"
                        },
                        "mode": {
                            "default": "overwrite",
                            "description": "Write mode: 'overwrite' to clear file, 'append' to add to end.",
                            "enum": [
                                "overwrite",
                                "append"
                            ],
                            "type": "string"
                        },
                        "path": {
                            "description": "File path to write.",
                            "type": "string"
                        }
                    },
                    "required": [
                        "path",
                        "content"
                    ],
                    "type": "object"
                }
            }
        ]
    },
    "ui": {
        "tools": [
            {
                "name": "list_root_windows",
                "description": "List all root windows with their associated information. Returns a list of root windows, including their window IDs, window titles, process IDs, and process names.",
                "inputSchema": {
                    "properties": {

                    },
                    "required": [

                    ],
                    "type": "object"
                }
            },
            {
                "name": "get_active_window",
                "description": "Retrieve information about the currently active window. Returns details including window ID, title, process ID (pid), and process name (pname).",
                "inputSchema": {
                    "properties": {

                    },
                    "required": [

                    ],
                    "type": "object"
                }
            },
            {
                "name": "activate_window",
                "description": "Activate a specific window by its window ID.",
                "inputSchema": {
                    "properties": {
                        "window_id": {
                            "description": "The unique identifier of the window to activate.",
                            "type": "integer"
                        }
                    },
                    "required": [
                        "window_id"
                    ],
                    "type": "object"
                }
            },
            {
                "name": "maximize_window",
                "description": "Maximize a specific window by its window ID.",
                "inputSchema": {
                    "properties": {
                        "window_id": {
                            "description": "The unique identifier of the window to maximize.",
                            "type": "integer"
                        }
                    },
                    "required": [
                        "window_id"
                    ],
                    "type": "object"
                }
            },
            {
                "name": "minimize_window",
                "description": "Minimize a specific window by its window ID.",
                "inputSchema": {
                    "properties": {
                        "window_id": {
                            "description": "The unique identifier of the window to minimize.",
                            "type": "integer"
                        }
                    },
                    "required": [
                        "window_id"
                    ],
                    "type": "object"
                }
            },
            {
                "name": "restore_window",
                "description": "Restore a specific window to its normal state by its window ID.",
                "inputSchema": {
                    "properties": {
                        "window_id": {
                            "description": "The unique identifier of the window to restore.",
                            "type": "integer"
                        }
                    },
                    "required": [
                        "window_id"
                    ],
                    "type": "object"
                }
            },
            {
                "name": "close_window",
                "description": "Close a specific window by its window ID.",
                "inputSchema": {
                    "properties": {
                        "window_id": {
                            "description": "The unique identifier of the window to close.",
                            "type": "integer"
                        }
                    },
                    "required": [
                        "window_id"
                    ],
                    "type": "object"
                }
            },
            {
                "name": "resize_window",
                "description": "Resize a specific window by its window ID.",
                "inputSchema": {
                    "properties": {
                        "height": {
                            "description": "The new height of the window (in pixels).",
                            "type": "integer"
                        },
                        "width": {
                            "description": "The new width of the window (in pixels).",
                            "type": "integer"
                        },
                        "window_id": {
                            "description": "The unique identifier of the window to resize.",
                            "type": "integer"
                        }
                    },
                    "required": [
                        "window_id",
                        "width",
                        "height"
                    ],
                    "type": "object"
                }
            },
            {
                "name": "fullscreen_window",
                "description": "Set a specific window to fullscreen mode by its window ID.",
                "inputSchema": {
                    "properties": {
                        "window_id": {
                            "description": "The unique identifier of the window to set to fullscreen.",
                            "type": "integer"
                        }
                    },
                    "required": [
                        "window_id"
                    ],
                    "type": "object"
                }
            },
            {
                "name": "focus_mode",
                "description": "Enable or disable focus mode. When focus mode is enabled, only windows from the currently active process and its child processes are allowed to remain in the foreground. Attempts by other processes to bring their windows to the foreground will result in those windows being closed.",
                "inputSchema": {
                    "properties": {
                        "on": {
                            "description": "Whether to enable (true) or disable (false) focus mode.",
                            "type": "boolean"
                        }
                    },
                    "required": [
                        "on"
                    ],
                    "type": "object"
                }
            }
        ]
    }
}