mod mcp;
mod openai;
mod anthropic;
pub use mcp::McpAdapter;
pub use openai::OpenAiAdapter;
pub use anthropic::AnthropicAdapter;
use serde::{de::DeserializeOwned, Serialize};
pub trait ToolAdapter: Send + Sync + 'static {
type ToolSpec: Serialize + Send + Sync;
type CallRequest: DeserializeOwned + Send + Sync;
type CallResponse: Serialize + Send + Sync;
fn to_spec(meta: &crate::ToolMeta) -> Self::ToolSpec;
fn from_request(req: Self::CallRequest) -> Result<(String, serde_json::Value), crate::ToolError>;
fn to_response(output: serde_json::Value) -> Self::CallResponse;
}