use async_trait::async_trait;
use crate::error::Result;
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ToolArgs {
pub params: HashMap<String, String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ToolResult {
pub success: bool,
pub output: String,
pub metadata: HashMap<String, String>,
}
#[async_trait]
pub trait Tool: Send + Sync {
async fn execute(&self, args: &ToolArgs) -> Result<ToolResult>;
fn name(&self) -> &str;
fn description(&self) -> &str;
}