use schemars::JsonSchema;
use serde::{Serialize, de::DeserializeOwned};
pub trait McpTool: Send + Sync {
type Input: JsonSchema + DeserializeOwned + Send + 'static;
type Output: JsonSchema + Serialize + Send + 'static;
fn name(&self) -> String;
fn description(&self) -> String;
fn title(&self) -> Option<String> {
None
}
fn call_tool(
&self,
input: Self::Input,
context: super::McpContext,
) -> impl Future<Output = Result<Self::Output, sacp::Error>> + Send;
}