MCPcopy Create free account
hub / github.com/bcefghj/miniClaudeCode / execute

Method execute

miniclaudecode/tools/file_write.py:34–42  ·  view source on GitHub ↗
(self, params: dict[str, Any])

Source from the content-addressed store, hash-verified

32 }
33
34 def execute(self, params: dict[str, Any]) -> ToolResult:
35 filepath = Path(params["path"]).expanduser()
36 content = params.get("content", "")
37 try:
38 filepath.parent.mkdir(parents=True, exist_ok=True)
39 filepath.write_text(content)
40 return ToolResult(output=f"Wrote {len(content)} chars to {filepath}")
41 except Exception as exc:
42 return ToolResult(output=f"Error writing file: {exc}", is_error=True)

Callers

nothing calls this directly

Calls 2

ToolResultClass · 0.85
getMethod · 0.80

Tested by

no test coverage detected