use async_trait::async_trait;
use serde::{Deserialize, Serialize};
use serde_json::Value;
use crate::Result;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Tool {
pub id: String,
pub name: String,
pub description: String,
pub parameters: Value,
pub requires_approval: bool,
}
#[async_trait]
pub trait ToolManager: Send + Sync {
async fn list_tools(&self) -> Result<Vec<Tool>>;
async fn get_tool(&self, id: &str) -> Result<Tool>;
async fn execute_tool(&self, id: &str, params: Value) -> Result<Value>;
async fn cancel_tool(&self, id: &str) -> Result<()>;
}