Append content to file. Args: path: Path to file content: Content to append Returns: Success message or error message
(path: str, content: str)
| 172 | |
| 173 | |
| 174 | def tool_append_file(path: str, content: str) -> str: |
| 175 | """ |
| 176 | Append content to file. |
| 177 | |
| 178 | Args: |
| 179 | path: Path to file |
| 180 | content: Content to append |
| 181 | |
| 182 | Returns: |
| 183 | Success message or error message |
| 184 | """ |
| 185 | try: |
| 186 | return _get_fs().append(path, content) |
| 187 | except FilesystemAccessError as e: |
| 188 | return f"[ERROR] {e}" |
| 189 | |
| 190 | |
| 191 | def tool_list_dir(path: str = ".") -> str: |