vtcode_core/mcp/
traits.rs1use super::types::{McpClientStatus, McpElicitationRequest, McpElicitationResponse, McpToolInfo};
4use anyhow::Result;
5use async_trait::async_trait;
6use serde_json::Value;
7
8#[async_trait]
10pub trait McpElicitationHandler: Send + Sync {
11 async fn handle_elicitation(
12 &self,
13 provider: &str,
14 request: McpElicitationRequest,
15 ) -> Result<McpElicitationResponse>;
16}
17
18#[async_trait]
20pub trait McpToolExecutor: Send + Sync {
21 async fn execute_mcp_tool(&self, tool_name: &str, args: &Value) -> Result<Value>;
22 async fn list_mcp_tools(&self) -> Result<Vec<McpToolInfo>>;
23 async fn has_mcp_tool(&self, tool_name: &str) -> Result<bool>;
24 fn get_status(&self) -> McpClientStatus;
25}