use crate::mcp::registry::{ToolCost, ToolExposure, ToolSpec, ToolStability};
use crate::mcp::schemas::*;
use crate::tools::*;
pub const PATH_TOOLS: &[ToolSpec] = &[
ToolSpec {
name: "path_normalize",
description: "Normalize a path using posixpath or ntpath semantics. Collapse dot segments, resolve components.",
handler: path_normalize_tool,
input_schema: path_normalize_input,
output_schema: path_normalize_output,
category: "path",
tier: 0,
profiles: &["full", "default", "codegg_core"],
tags: &["text", "path", "filesystem", "normalize"],
exposure: ToolExposure::Default,
harness_use: &["path_preflight"],
aliases: &[],
cost: ToolCost::Cheap,
stability: ToolStability::Stable,
composite: false,
},
ToolSpec {
name: "path_analyze",
description: "Analyze path components, extensions, hidden status, and traversal without filesystem access.",
handler: path_analyze,
input_schema: path_analyze_input,
output_schema: path_analyze_output,
category: "path",
tier: 2,
profiles: &["full"],
tags: &["text", "path", "filesystem", "lexical"],
exposure: ToolExposure::Contextual,
harness_use: &["none"],
aliases: &[],
cost: ToolCost::Cheap,
stability: ToolStability::Stable,
composite: false,
},
ToolSpec {
name: "path_compare",
description: "Compare two paths under explicit normalization rules: separator normalization, dot-segment collapsing, and optional case-insensitive comparison.",
handler: path_compare,
input_schema: path_compare_input,
output_schema: path_compare_output,
category: "path",
tier: 2,
profiles: &["full"],
tags: &["text", "path", "filesystem", "comparison"],
exposure: ToolExposure::Contextual,
harness_use: &["none"],
aliases: &[],
cost: ToolCost::Cheap,
stability: ToolStability::Stable,
composite: false,
},
ToolSpec {
name: "path_scope_check",
description: "Determine whether a target path remains lexically inside a declared root. Lexical only, does not resolve symlinks.",
handler: path_scope_check,
input_schema: path_scope_check_input,
output_schema: path_scope_check_output,
category: "path",
tier: 2,
profiles: &["full", "codegg_preflight"],
tags: &["text", "path", "filesystem", "security", "scope"],
exposure: ToolExposure::HarnessOnly,
harness_use: &["path_preflight"],
aliases: &[],
cost: ToolCost::Cheap,
stability: ToolStability::Stable,
composite: false,
},
ToolSpec {
name: "glob_match",
description: "Match a glob pattern against a path with explicit semantics: * matches within one segment, ** matches zero or more segments, ? matches one char. Python fnmatch limitations around ** are documented.",
handler: glob_match_tool,
input_schema: glob_match_input,
output_schema: glob_match_output,
category: "path",
tier: 1,
profiles: &["full", "default"],
tags: &["text", "glob", "pattern", "path", "wildcard"],
exposure: ToolExposure::Default,
harness_use: &["none"],
aliases: &[],
cost: ToolCost::Cheap,
stability: ToolStability::Stable,
composite: false,
},
ToolSpec {
name: "path_batch_scope_check",
description: "Check many target paths against a workspace root in one call. Detects escaping paths, absolute paths, traversal segments, and duplicate normalized targets.",
handler: path_batch_scope_check,
input_schema: path_batch_scope_check_input,
output_schema: path_batch_scope_check_output,
category: "path",
tier: 2,
profiles: &["full", "codegg_preflight", "codegg_patch"],
tags: &["text", "path", "security", "scope", "batch"],
exposure: ToolExposure::HarnessOnly,
harness_use: &["path_preflight"],
aliases: &[],
cost: ToolCost::Cheap,
stability: ToolStability::Stable,
composite: false,
},
];