Docs(mcp): correct claims in the server instructions agents rely on
The initialize.instructions text is the only guide a model gets (it cannot read docs/), and several statements disagreed with the code: - get_keylog was described as always visible; it is gated by McpKeylog and hidden when the switch is off. - Dangerous machine actions were not mentioned: freeze/thaw and stop/restart stay in tools/list but need McpMachineDangerous and return -32006 at call time. - -32006 was described as policy/admin-only; MFC also returns it when an old client lacks CLIENT_CAP_V2. The Go server returns -32005 for that case, so its own instructions now say so. - -32001 advice assumed every failure is a timeout; it also covers cancellations, http_probe parse failures and unconfirmed writes. - "Unsupported combos always return -32005 immediately" ignored paths that surface as -32001 once a sub-connection is involved. - Linux matrix listed all host_* as unsupported, but host_set_remark and host_set_watch_level only touch server-local data. - local_dir / local_path are paths on the controller, not the user's box. Also align the error table and platform distribution in the docs, and note that hidden fallback aliases remain callable. Debug build green; go test, check_platform_table and gen_go_tools --check pass. Co-Authored-By: deepseek-flash
This commit is contained in:
1 parent
292c3191dc
commit
d49ebe521d
4 files changed
+37
-18
No files matched your search
@@ -88,14 +88,17 @@ python tools/mcp_tools/verify_tools.py --live mcp/tools.json
|
||||
| 命令分支 | `client/`、`linux/main.cpp`、`macos/main.mm`、`android/app/src/main/cpp/main.cpp` |
|
||||
| 能力位 | `common/commands.h` 的 `LOGIN_INFOR::DefaultCaps()`;Linux 另在 `linux/main.cpp:RefreshLoginCaps` 追加 `SCREEN_PREVIEW` |
|
||||
|
||||
当前分布(61 个工具):
|
||||
当前分布(54 个工具):
|
||||
|
||||
| platforms | 数量 | 典型工具 |
|
||||
|---|---|---|
|
||||
| `win+lnx+mac+apk` | 10 | 只读写服务端本地数据:`list_online_hosts` / `get_audit_log` / `mcp_*` |
|
||||
| `win+lnx+mac` | 6 | 进程列表、文件列取、日志、V2 文件传输、`copy_files_c2c` |
|
||||
| `win+lnx` | 12 | `remote_*` 全族、`get_screenshot`、`get_activity_history`、`exec_command` / `terminal_*` / `kill_process` |
|
||||
| `win` | 33 | 服务 / 注册表 / 键日志 / 文件写 / **`list_windows`** / `get_foreground_window` / `host_*` / `chat_*` / `power_action` |
|
||||
| `win+lnx+mac+apk` | 9 | 只读写服务端本地数据:`list_hosts` / `get_host_detail` / `get_client_log` / `get_audit_log` / `get_server_status` / `mcp_*` / `host_set_remark` / `host_set_watch_level` |
|
||||
| `win+lnx+apk` | 11 | `remote_*` 全族、`exec_command` / `terminal_*`、`get_screenshot`、`get_activity_history` |
|
||||
| `win+lnx+mac` | 6 | 进程列表、文件列取 / V2 文件传输(含 `read_file`)、`copy_files_c2c` |
|
||||
| `win+lnx` | 2 | `http_probe`、`kill_process` |
|
||||
| `win+apk` | 6 | `remote_block_input`、`uninstall_host`、`chat_*` 全族 |
|
||||
| `win` | 19 | 服务 / 注册表 / 键日志 / 文件搜索与写入 / **`list_windows`** / `get_foreground_window` / `host_inspect` / `host_control_*` / `operate_window` / 网络连接 / `power_action` |
|
||||
| `apk` | 1 | `remote_lock_screen` |
|
||||
|
||||
**注意 `exec_command` / `terminal_*` / `kill_process` 不在 `win+lnx+mac` 组**:
|
||||
macOS 客户端其实有对应实现(`macos/main.mm:753` 的 `ShellworkingThread` 跑 PTY,
|
||||
@@ -107,8 +110,9 @@ macOS 客户端其实有对应实现(`macos/main.mm:753` 的 `ShellworkingThre
|
||||
`SystemManager.h:38` 和 macOS 的 `SystemManager.mm:39` 都有 `COMMAND_WSLIST`
|
||||
的 `case` 分支,看起来是支持的。但 `BuildListWindows` 把命令发在**主连接**上
|
||||
(`McpServer.cpp:2931`),而这两个平台的主循环只处理 `COMMAND_SYSTEM`
|
||||
(起 SystemManager 子连接),`WSLIST` 在子连接里才被处理——走不到。实测 Linux
|
||||
上直接超时 `-32001`。那两个 `case` 是给 SystemDlg 窗口管理用的,不是 MCP 这条路径。
|
||||
(起 SystemManager 子连接),`WSLIST` 在子连接里才被处理——走不到。关掉平台门禁
|
||||
(`McpPlatformGuard=0`)时实测 Linux 上直接超时 `-32001`;默认门禁开启时,这张表
|
||||
会先拦下并返回 `-32005`。那两个 `case` 是给 SystemDlg 窗口管理用的,不是 MCP 这条路径。
|
||||
Windows 是在主循环里处理的(`client/KernelManager.cpp:1491`),所以正常。
|
||||
|
||||
### 平台优先级(产品定位)
|
||||
|
||||
Reference in new issue
Block a user