scope_for_tool

Function scope_for_tool 

Source
pub fn scope_for_tool(tool: &str) -> Option<ToolScope>
Expand description

工具名 → 所需 scope 的中央注册表

新加工具时必须同步更新这里,否则 require_tool_scope() 返回 None, handler 会 fail-closed 地拒绝请求(“unknown MCP tool”)。 配套的 all_known_tools_have_scopes 测试也会失败。

对应 REST 的 futu_rest::auth::scope_for_path(),保持一致的 fail-closed 策略。