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

Method decorator

tutorials/18_design_patterns_for_agents.py:692–694  ·  view source on GitHub ↗
(func)

Source from the content-addressed store, hash-verified

690 def tool(self, name: str):
691 """装饰器: @registry.tool("bash")"""
692 def decorator(func):
693 self._handlers[name] = func
694 return func
695 return decorator
696
697 def execute(self, name: str, inp: str) -> str:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected