Files
owlen/crates/owlen-core/src/mcp/client.rs

22 lines
731 B
Rust

use super::{McpToolCall, McpToolDescriptor, McpToolResponse};
use crate::{Result, mode::Mode};
use async_trait::async_trait;
/// Trait for a client that can interact with an MCP server
#[async_trait]
pub trait McpClient: Send + Sync {
/// List the tools available on the server
async fn list_tools(&self) -> Result<Vec<McpToolDescriptor>>;
/// Call a tool on the server
async fn call_tool(&self, call: McpToolCall) -> Result<McpToolResponse>;
/// Update the server with the active operating mode.
async fn set_mode(&self, _mode: Mode) -> Result<()> {
Ok(())
}
}
// Re-export the concrete implementation that supports stdio and HTTP transports.
pub use super::remote_client::RemoteMcpClient;