#[cfg(feature = "mcp")]
pub mod server;
#[cfg(feature = "mcp")]
pub mod tools;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum OutputFormat {
Text,
Json,
}
impl Default for OutputFormat {
fn default() -> Self {
Self::Text
}
}
#[derive(Debug, Clone)]
pub struct McpConfig {
pub verbose: bool,
pub output_format: OutputFormat,
pub max_tts_text_length: usize,
}
impl Default for McpConfig {
fn default() -> Self {
Self {
verbose: false,
output_format: OutputFormat::Text,
max_tts_text_length: 5000,
}
}
}
#[cfg(feature = "mcp")]
pub async fn run_server(
enable_tools: Option<&str>,
disable_tools: Option<&str>,
disable_admin: bool,
disable_destructive: bool,
read_only: bool,
) -> anyhow::Result<()> {
server::run_server(
enable_tools,
disable_tools,
disable_admin,
disable_destructive,
read_only,
)
.await
}
#[cfg(not(feature = "mcp"))]
pub async fn run_server(
_enable_tools: Option<&str>,
_disable_tools: Option<&str>,
_disable_admin: bool,
_disable_destructive: bool,
_read_only: bool,
) -> anyhow::Result<()> {
anyhow::bail!("MCP support not compiled in. Rebuild with --features mcp")
}