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

Method register

tutorials/18_design_patterns_for_agents.py:639–641  ·  view source on GitHub ↗

注册一个工具: 名字 → 处理函数

(self, name: str, handler: Callable[[str], str])

Source from the content-addressed store, hash-verified

637 self._handlers: dict[str, Callable[[str], str]] = {}
638
639 def register(self, name: str, handler: Callable[[str], str]):
640 """注册一个工具: 名字 → 处理函数"""
641 self._handlers[name] = handler
642
643 def execute(self, name: str, tool_input: str) -> str:
644 """按名字查找并执行"""

Callers 3

lesson_3_builder_patternFunction · 0.45
lesson_6_full_demoFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected