pub fn validate_local_path(path: &str) -> Result<PathBuf, McpError>Expand description
Validate a LocalFile path. Must be absolute, must exist, must
canonicalize cleanly with no .. components in the result. Returns
the canonical path on success.
§Errors
- Returns
ErrorCode::InvalidArgumentifpathis relative or if the canonicalized path contains..components (symlink escape). - Returns
ErrorCode::FileNotFoundifstd::fs::canonicalizefails — typically because the file does not exist or a parent directory is not traversable.