use crate::mcp::registry::{ToolCost, ToolExposure, ToolSpec, ToolStability};
use crate::mcp::schemas::*;
use crate::tools::*;
pub const CONFIG_TOOLS: &[ToolSpec] = &[
ToolSpec {
name: "dotenv_validate",
description: "Validate .env-style key=value configuration text. Detects invalid keys, duplicate keys, missing quotes, and variable expansion syntax. Line-by-line parser, no shell evaluation.",
handler: dotenv_validate,
input_schema: dotenv_validate_input,
output_schema: dotenv_validate_output,
category: "config",
tier: 2,
profiles: &["full", "codegg_config"],
tags: &["validation", "config", "env", "dotenv"],
exposure: ToolExposure::Contextual,
harness_use: &["config_preflight"],
aliases: &[],
cost: ToolCost::Cheap,
stability: ToolStability::Stable,
composite: false,
},
ToolSpec {
name: "ini_validate",
description: "Validate simple INI-style configuration files. Supports [section] headers, key=value and key:value lines, comments. Detects duplicate sections, duplicate keys, and malformed lines.",
handler: ini_validate,
input_schema: ini_validate_input,
output_schema: ini_validate_output,
category: "config",
tier: 2,
profiles: &["full", "codegg_config"],
tags: &["validation", "config", "ini"],
exposure: ToolExposure::Contextual,
harness_use: &["config_preflight"],
aliases: &[],
cost: ToolCost::Cheap,
stability: ToolStability::Stable,
composite: false,
},
ToolSpec {
name: "config_preflight",
description: "Composite: validate generated config text. Auto-detects format and runs the appropriate validator. Returns valid/invalid, detected format, parse error location, and machine code.",
handler: config_preflight,
input_schema: config_preflight_input,
output_schema: config_preflight_output,
category: "config",
tier: 1,
profiles: &["full", "codegg_core", "codegg_core_min", "codegg_preflight", "codegg_config"],
tags: &["config", "validation", "json", "toml", "preflight", "composite"],
exposure: ToolExposure::Default,
harness_use: &["config_preflight"],
aliases: &[],
cost: ToolCost::Heavy,
stability: ToolStability::Stable,
composite: true,
},
];