Execute a tool by name using the registry's default context
(&self, name: &str, args: &serde_json::Value)
| 192 | |
| 193 | /// Execute a tool by name using the registry's default context |
| 194 | pub async fn execute(&self, name: &str, args: &serde_json::Value) -> Result<ToolResult> { |
| 195 | let ctx = self.context(); |
| 196 | self.execute_with_context(name, args, &ctx).await |
| 197 | } |
| 198 | |
| 199 | /// Execute a tool by name with an external context |
| 200 | pub async fn execute_with_context( |