MCPcopy Create free account
hub / github.com/InfinitiBit/graphbit / has_tool

Method has_tool

python/src/tools/registry.rs:178–186  ·  view source on GitHub ↗

Check if a tool is registered

(&self, name: &str)

Source from the content-addressed store, hash-verified

176
177 /// Check if a tool is registered
178 pub fn has_tool(&self, name: &str) -> PyResult<bool> {
179 let tools = self.tools.read().map_err(|e| {
180 PyErr::new::<pyo3::exceptions::PyRuntimeError, _>(format!(
181 "Failed to acquire tools lock: {}",
182 e
183 ))
184 })?;
185 Ok(tools.contains_key(name))
186 }
187
188 /// Get list of registered tool names
189 pub fn list_tools(&self) -> PyResult<Vec<String>> {

Calls

no outgoing calls

Tested by

no test coverage detected