MCPcopy Create free account
hub / github.com/Louisym/MiniCC / __init__

Method __init__

tutorials/03_tool_system.py:263–268  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

261 """
262
263 def __init__(self):
264 # _handlers 是一个字典:工具名 → 执行函数
265 # 就像一本电话簿:名字 → 电话号码
266 self._handlers: dict[str, Callable[[dict], str]] = {}
267 # _specs 保存工具的说明书
268 self._specs: dict[str, ToolSpec] = {}
269
270 def register(self, spec: ToolSpec, handler: Callable[[dict], str]) -> "ToolExecutor":
271 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected