This commit is contained in:
@@ -66,6 +66,16 @@ def is_mcp_router_enabled() -> bool:
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
# Tool 白名單(caller × server × tool)— 限制 LLM 不能亂打 MCP
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
READONLY_FILESYSTEM_TOOLS = [
|
||||
'list_allowed_directories',
|
||||
'list_directory',
|
||||
'directory_tree',
|
||||
'read_file',
|
||||
'read_multiple_files',
|
||||
'search_files',
|
||||
'get_file_info',
|
||||
]
|
||||
|
||||
TOOL_REGISTRY: Dict[str, Dict[str, List[str]]] = {
|
||||
# mcp_collector 取代 Gemini Grounding
|
||||
'mcp_collector': {
|
||||
@@ -83,6 +93,10 @@ TOOL_REGISTRY: Dict[str, Dict[str, List[str]]] = {
|
||||
'postgres': ['query'],
|
||||
'omnisearch': ['tavily_search', 'exa_search'],
|
||||
},
|
||||
# filesystem-mcp 僅掛載 /data、/logs read-only;保留給診斷工具讀檔,不開寫入類工具。
|
||||
'ops_diagnostics': {
|
||||
'filesystem': READONLY_FILESYSTEM_TOOLS,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user