MCPcopy Create free account
hub / github.com/0xKarl-dev/claw-codes / execute_tool

Function execute_tool

src/tools.py:81–86  ·  view source on GitHub ↗
(name: str, payload: str = '')

Source from the content-addressed store, hash-verified

79
80
81def execute_tool(name: str, payload: str = '') -> ToolExecution:
82 module = get_tool(name)
83 if module is None:
84 return ToolExecution(name=name, source_hint='', payload=payload, handled=False, message=f'Unknown mirrored tool: {name}')
85 action = f"Mirrored tool '{module.name}' from {module.source_hint} would handle payload {payload!r}."
86 return ToolExecution(name=module.name, source_hint=module.source_hint, payload=payload, handled=True, message=action)
87
88
89def render_tool_index(limit: int = 20, query: str | None = None) -> str:

Callers 2

executeMethod · 0.70
mainFunction · 0.70

Calls 2

get_toolFunction · 0.85
ToolExecutionClass · 0.85

Tested by

no test coverage detected