(self, params: dict[str, Any])
| 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) |
nothing calls this directly
no test coverage detected