Feature(mcp): merge the ten host_list_* tools into host_inspect
The ten read-only host-management tools (host_list_processes, windows, network_state, software, browser_history, favorites, win32_services, driver_services, scheduled_tasks, host_get_hosts_file) each carried a name, description and schema for what is one connection to the host, one tab id per aspect and one paged list shape. Ten entries made tools/list hard to scan and took a large share of the description budget. They are now one tool, host_inspect(aspects[], ...), where aspects is a required, deduplicated array of the ten former names. A single aspect returns exactly what the old tool returned (same builder, same code path), so output is byte-identical; several aspects are fetched over separate managed sessions and merged into results.<aspect>, with failures isolated in errors.<aspect> and isError only when every aspect failed. Filters (pid/name/arch/title/url/publisher/folder/status/ start_type/process/protocol/ports/state/max_bytes) are still applied server-side before paging and are ignored by aspects they don't apply to. The old names stay as dispatch aliases so existing callers keep working but no longer appear in tools/list; the platform table, batch read-only list, tool hints, instructions, generator tables and the captured mcp/tools.json move to the new name (63 tools -> 54). The description also notes that win32_services / driver_services need an elevated client: a non-elevated one cannot open SCM and never answers, so the call times out after ~12 s. Co-Authored-By: deepseek-flash
This commit is contained in:
1 parent
cac5adaafc
commit
59f0f16f74
5 files changed
+1034
-1803
No files matched your search
@@ -84,16 +84,8 @@ GATE = {
|
||||
|
||||
# ---- McpMachine 族:总开关 McpMachine ----
|
||||
"list_network_connections": ("machine", False, False),
|
||||
"host_list_processes": ("machine", False, False),
|
||||
"host_list_windows": ("machine", False, False),
|
||||
"host_list_network_state": ("machine", False, False),
|
||||
"host_list_software": ("machine", False, False),
|
||||
"host_list_browser_history": ("machine", False, False),
|
||||
"host_list_favorites": ("machine", False, False),
|
||||
"host_list_win32_services": ("machine", False, False),
|
||||
"host_list_driver_services": ("machine", False, False),
|
||||
"host_list_scheduled_tasks": ("machine", False, False),
|
||||
"host_get_hosts_file": ("machine", False, False),
|
||||
# P2-1:10 个 host_list_* / host_get_hosts_file 合并(旧名为别名,不出现在 tools/list)
|
||||
"host_inspect": ("machine", False, False),
|
||||
"kill_network_connection": ("machine", True, True), # writable && IsManageEnabled()
|
||||
"host_control_process": ("machine", True, False), # writable
|
||||
"host_control_window": ("machine", True, False),
|
||||
@@ -216,16 +208,8 @@ PLATFORMS = {
|
||||
# McpMachine 族(COMMAND_MACHINE_MANAGE 仅 Windows 实现)
|
||||
"list_network_connections": _WIN,
|
||||
"kill_network_connection": _WIN,
|
||||
"host_list_processes": _WIN,
|
||||
"host_list_windows": _WIN,
|
||||
"host_list_network_state": _WIN,
|
||||
"host_list_software": _WIN,
|
||||
"host_list_browser_history": _WIN,
|
||||
"host_list_favorites": _WIN,
|
||||
"host_list_win32_services": _WIN,
|
||||
"host_list_driver_services": _WIN,
|
||||
"host_list_scheduled_tasks": _WIN,
|
||||
"host_get_hosts_file": _WIN,
|
||||
# P2-1:10 个 host_list_* / host_get_hosts_file 合并为 host_inspect(仅 Windows)
|
||||
"host_inspect": _WIN,
|
||||
"host_control_process": _WIN,
|
||||
"host_control_window": _WIN,
|
||||
"host_control_service": _WIN,
|
||||
|
||||
Reference in new issue
Block a user