MCPcopy Create free account
hub / github.com/OpenOSINT/OpenOSINT / _execute_tool

Function _execute_tool

openosint/agent.py:406–416  ·  view source on GitHub ↗

Invoke on_tool_call callback then run the tool, returning its string result.

(
    tool_name: str,
    tool_input: dict[str, Any],
    on_tool_call: Any,
)

Source from the content-addressed store, hash-verified

404
405
406async def _execute_tool(
407 tool_name: str,
408 tool_input: dict[str, Any],
409 on_tool_call: Any,
410) -> str:
411 """Invoke on_tool_call callback then run the tool, returning its string result."""
412 if on_tool_call is not None:
413 await on_tool_call(tool_name, tool_input)
414 if tool_name in _TOOL_MAP:
415 return await _TOOL_MAP[tool_name](tool_input)
416 return f"Error: unknown tool '{tool_name}'."
417
418
419async def _process_tool_turn(

Callers 2

_process_tool_turnFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected