MCPcopy Create free account
hub / github.com/NVIDIA/NeMo-Relay / register_tool_execution_intercept

Function register_tool_execution_intercept

crates/python/src/py_api/mod.rs:987–998  ·  view source on GitHub ↗
(
    name: &str,
    priority: i32,
    callable: Py<PyAny>,
)

Source from the content-addressed store, hash-verified

985/// implementation; skip calling ``next`` to short-circuit.
986#[pyfunction]
987fn register_tool_execution_intercept(
988 name: &str,
989 priority: i32,
990 callable: Py<PyAny>,
991) -> PyResult<()> {
992 core_registry_api::register_tool_execution_intercept(
993 name,
994 priority,
995 py_callable::wrap_py_tool_exec_intercept_fn(callable),
996 )
997 .map_err(to_py_err)
998}
999
1000/// Remove a previously registered tool execution intercept.
1001#[pyfunction]

Calls 1