Check if a tool is registered
(&self, name: &str)
| 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>> { |
no outgoing calls
no test coverage detected