use async_trait::async_trait;
use serde_json::Value;
use crate::context::CapsuleToolContext;
use crate::error::CapsuleResult;
#[async_trait]
pub trait CapsuleTool: Send + Sync {
fn name(&self) -> &str;
fn description(&self) -> &str;
fn input_schema(&self) -> Value;
async fn execute(&self, args: Value, ctx: &CapsuleToolContext) -> CapsuleResult<String>;
}
impl std::fmt::Debug for dyn CapsuleTool {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("CapsuleTool")
.field("name", &self.name())
.finish_non_exhaustive()
}
}