diff --git a/Cargo.toml b/Cargo.toml index 6e6cefb0..d5bf91cb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ members = [ ] [workspace.package] -version = "0.1.0" +version = "0.1.6" edition = "2021" license = "Apache-2.0 OR MIT" repository = "https://github.com/RightNow-AI/openfang" diff --git a/crates/openfang-kernel/src/kernel.rs b/crates/openfang-kernel/src/kernel.rs index 7a9c442e..251f954c 100644 --- a/crates/openfang-kernel/src/kernel.rs +++ b/crates/openfang-kernel/src/kernel.rs @@ -4065,7 +4065,18 @@ impl OpenFangKernel { tool_names.join(", ") )); } - summary.push_str("MCP tools are prefixed with mcp_{server}_ and work like regular tools."); + summary.push_str("MCP tools are prefixed with mcp_{server}_ and work like regular tools.\n"); + // Add filesystem-specific guidance when a filesystem MCP server is connected + let has_filesystem = servers.keys().any(|s| s.contains("filesystem")); + if has_filesystem { + summary.push_str( + "IMPORTANT: For accessing files OUTSIDE your workspace directory, you MUST use \ + the MCP filesystem tools (e.g. mcp_filesystem_read_file, mcp_filesystem_list_directory) \ + instead of the built-in file_read/file_list/file_write tools, which are restricted to \ + the workspace. The MCP filesystem server has been granted access to specific directories \ + by the user.", + ); + } summary } diff --git a/crates/openfang-runtime/src/workspace_sandbox.rs b/crates/openfang-runtime/src/workspace_sandbox.rs index a295c13b..306c49f2 100644 --- a/crates/openfang-runtime/src/workspace_sandbox.rs +++ b/crates/openfang-runtime/src/workspace_sandbox.rs @@ -56,7 +56,11 @@ pub fn resolve_sandbox_path(user_path: &str, workspace_root: &Path) -> Result