Feature(mcp): merge the three host-list tools into list_hosts
list_online_hosts, search_hosts and list_all_hosts differed only in whether offline hosts were included and in which filter fields they accepted, which made the host-list surface confusing and duplicated three handlers over the same CollectAllHosts snapshot. They now share one tool, list_hosts(query?, online?=true, include_offline?=false, group?, os?, client_type?, limit?, offset?). The old names stay as aliases routed to the same handler, so existing callers keep working, but tools/list exposes only list_hosts. The legacy "offline" boolean of list_all_hosts is still honored, and list_all_hosts keeps its online+offline default. With offline history included the list is now ordered online-first: the host library holds thousands of records, so the default page of 100 would otherwise be all stale entries and the online hosts a caller can actually operate on would be buried behind paging. instructions, every id-description string, the platform table, the tools.json generator and the captured mcp/tools.json are updated to the new name (65 tools -> 63). Co-Authored-By: deepseek-flash
This commit is contained in:
1 parent
613aa7291a
commit
88269df548
3 files changed
+191
-481
No files matched your search
@@ -21,9 +21,8 @@ DST = sys.argv[2]
|
||||
# manage: 额外需要 McpManage(仅 McpMachine 族的两处用到)
|
||||
GATE = {
|
||||
# ---- McpServer.cpp:BuildToolsListResult 无条件段 ----
|
||||
"list_online_hosts": (None, False, False),
|
||||
"search_hosts": (None, False, False),
|
||||
"list_all_hosts": (None, False, False),
|
||||
# P1-1:list_online_hosts / search_hosts / list_all_hosts 三合一(旧名为别名,不出现在 tools/list)
|
||||
"list_hosts": (None, False, False),
|
||||
"get_host_detail": (None, False, False),
|
||||
"list_processes": (None, False, False),
|
||||
"list_windows": (None, False, False),
|
||||
@@ -142,9 +141,7 @@ _APKONLY = ["apk"]
|
||||
|
||||
PLATFORMS = {
|
||||
# 服务端本地数据,与客户端平台无关
|
||||
"list_online_hosts": _APK,
|
||||
"search_hosts": _APK,
|
||||
"list_all_hosts": _APK,
|
||||
"list_hosts": _APK,
|
||||
"get_host_detail": _APK,
|
||||
"get_audit_log": _APK,
|
||||
"get_server_status": _APK,
|
||||
|
||||
Reference in new issue
Block a user