MCPcopy Create free account
hub / github.com/GCWing/BitFun / tool_requires_workspace_path

Function tool_requires_workspace_path

src/apps/desktop/src/api/tool_api.rs:235–242  ·  view source on GitHub ↗
(tool_name: &str, input: &serde_json::Value)

Source from the content-addressed store, hash-verified

233}
234
235fn tool_requires_workspace_path(tool_name: &str, input: &serde_json::Value) -> bool {
236 match tool_name {
237 "Bash" => true,
238 "Glob" | "Grep" => input.get("path").is_none() || is_relative_path(input.get("path")),
239 "Read" | "Write" | "Edit" | "GetFileDiff" => is_relative_path(input.get("file_path")),
240 _ => false,
241 }
242}
243
244fn ensure_workspace_requirement(
245 tool_name: &str,

Callers 1

Calls 2

is_relative_pathFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected