(name: str, payload: str = '')
| 79 | |
| 80 | |
| 81 | def 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 | |
| 89 | def render_tool_index(limit: int = 20, query: str | None = None) -> str: |
no test coverage detected