MCPcopy Create free account
hub / github.com/AI45Lab/Code / tool_definitions

Method tool_definitions

sdk/python/src/lib.rs:2735–2740  ·  view source on GitHub ↗

Return full model-visible tool definitions currently registered on this session.

(&self, py: Python<'_>)

Source from the content-addressed store, hash-verified

2733
2734 /// Return full model-visible tool definitions currently registered on this session.
2735 fn tool_definitions(&self, py: Python<'_>) -> PyResult<PyObject> {
2736 let json = serde_json::to_string(&self.inner.tool_definitions()).map_err(|e| {
2737 PyRuntimeError::new_err(format!("Failed to serialize tool definitions: {e}"))
2738 })?;
2739 json_string_to_py(py, &json)
2740 }
2741
2742 /// Return a stored tool artifact by URI, or ``None`` if it is not retained.
2743 fn get_artifact(&self, py: Python<'_>, artifact_uri: &str) -> PyResult<PyObject> {

Callers

nothing calls this directly

Calls 1

json_string_to_pyFunction · 0.85

Tested by

no test coverage detected