MCPcopy Index your code
hub / github.com/InfinitiBit/graphbit / tool

Function tool

python/src/tools/decorator.rs:242–252  ·  view source on GitHub ↗
(_description: Option<String>, py: Python<'_>)

Source from the content-addressed store, hash-verified

240#[pyfunction]
241#[pyo3(signature = (_description=None))]
242pub(crate) fn tool(_description: Option<String>, py: Python<'_>) -> PyResult<PyObject> {
243 // Create a simple decorator that just returns the function
244 // The actual registration happens when the node processes the tools
245 let decorator_func = py.eval(
246 c"lambda func: func", // Simple pass-through decorator
247 None,
248 None,
249 )?;
250
251 Ok(decorator_func.into_pyobject(py)?.into_any().unbind())
252}
253
254/// Get the global tool registry
255#[pyfunction]

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected