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

Function ensure_workspace_requirement

src/apps/desktop/src/api/tool_api.rs:244–259  ·  view source on GitHub ↗
(
    tool_name: &str,
    input: &serde_json::Value,
    workspace_path: Option<&str>,
)

Source from the content-addressed store, hash-verified

242}
243
244fn ensure_workspace_requirement(
245 tool_name: &str,
246 input: &serde_json::Value,
247 workspace_path: Option<&str>,
248) -> Result<(), String> {
249 if tool_requires_workspace_path(tool_name, input)
250 && !has_explicit_workspace_path(workspace_path)
251 {
252 return Err(format!(
253 "workspacePath is required to execute tool '{}' with workspace-relative input",
254 tool_name
255 ));
256 }
257
258 Ok(())
259}
260
261#[tauri::command]
262pub async fn get_all_tools_info() -> Result<Vec<ToolInfo>, String> {

Callers 2

validate_tool_inputFunction · 0.85
execute_toolFunction · 0.85

Calls 2

Tested by

no test coverage detected