use std::collections::HashMap;
use serde_json::Value;
use super::{blast_radius, call_graph, cfg, data_flow};
use crate::mcp::context::AnalysisContext;
pub fn execute(args: &HashMap<String, Value>, context: &AnalysisContext) -> Result<Value, String> {
let mode = args
.get("mode")
.and_then(|v| v.as_str())
.ok_or("Missing 'mode' argument (call_graph, data_flow, cfg, blast_radius)")?;
match mode {
"call_graph" => call_graph::execute(args, context),
"data_flow" => data_flow::execute(args, context),
"cfg" => cfg::execute(args, context),
"blast_radius" => blast_radius::execute(args, context),
_ => Err(format!(
"Unknown mode '{}'. Use: call_graph, data_flow, cfg, blast_radius",
mode
)),
}
}