| 9 | /// and returns `ToolResult` (struct-based output) instead of trait objects. |
| 10 | #[async_trait] |
| 11 | pub trait ToolHandler: Send + Sync { |
| 12 | /// Return the tool's specification. |
| 13 | fn spec(&self) -> &ToolSpec; |
| 14 | |
| 15 | /// Execute the tool with the given context and input. |
| 16 | async fn handle( |
| 17 | &self, |
| 18 | ctx: ToolContext, |
| 19 | input: serde_json::Value, |
| 20 | progress: Option<ToolProgressSender>, |
| 21 | ) -> Result<ToolResult, ToolCallError>; |
| 22 | } |
nothing calls this directly
no outgoing calls
no test coverage detected