use crate::models::churn::ChurnOutputFormat;
use crate::handlers::tools_advanced::{
handle_analyze_dead_code, handle_analyze_deep_context, handle_analyze_lint_hotspot,
handle_analyze_makefile_lint, handle_analyze_provability, handle_analyze_satd,
handle_analyze_tdg, handle_quality_driven_development,
};
use crate::models::mcp::{
GenerateTemplateArgs, ListTemplatesArgs, McpRequest, McpResponse, ScaffoldProjectArgs,
SearchTemplatesArgs, ToolCallParams, ValidateTemplateArgs,
};
use crate::models::template::{ParameterSpec, TemplateResource};
use crate::services::git_analysis::GitAnalysisService;
use crate::services::template_service;
use crate::TemplateServerTrait;
use serde::{Deserialize, Serialize};
use serde_json::json;
use std::path::{Path, PathBuf};
use std::sync::Arc;
use tracing::{error, info};
fn require_project_path(project_path_arg: Option<String>) -> Result<PathBuf, String> {
let Some(raw) = project_path_arg else {
return Err(
"'project_path' is required and must be a non-empty string — \
null/missing is rejected to avoid silently analyzing the server's current \
directory (R22-1 / D101)"
.to_string(),
);
};
if raw.trim().is_empty() {
return Err(
"'project_path' must be a non-empty string — empty/whitespace values \
are rejected to avoid silently analyzing the server's current directory \
(R22-1 / D101)"
.to_string(),
);
}
Ok(PathBuf::from(raw))
}
include!("core_tools_path_resolve.rs");
include!("core_tools_dispatch.rs");
include!("core_tools_template_handlers.rs");
include!("core_tools_churn.rs");