tools.file_ops module

File operations: create, read, edit, delete files on disk.

async tools.file_ops.run(action, file_path, contents=None, old_string=None, new_string=None, replace_all=False, **_kwargs)[source]

Execute this tool and return the result.

Parameters:
  • action (str) – The action value.

  • file_path (str) – The file path value.

  • contents (str | None) – The contents value.

  • old_string (str | None) – The old string value.

  • new_string (str | None) – The new string value.

  • replace_all (bool) – The replace all value.

Returns:

Result string.

Return type:

str