list_directory:The 'list_directory' tool allows users to list all files and directories within a specified folder. It requires a single parameter, 'dir_path', which is a string representing the path to the subdirectory you wish to list. If 'dir_path' is not provided, the tool defaults to the current directory ('.'). The path can be either relative to the base directory or an absolute path. The tool lists all files and directories, including hidden ones, if present. However, it is restricted to listing directories within the current working directory. Attempting to access directories outside of this scope will result in an 'Access denied' error. Ensure the path is correct, accessible, and within the permitted directory to avoid errors. If the specified directory does not exist, an error message will be returned. Example usage: specifying 'dir_path' as 'documents/reports' will list the contents of that directory if it is within the current working directory.
copy_file:The 'copy_file' tool enables users to duplicate a specified file and save it to a chosen location. It requires two parameters: 'source_path', the path of the file to be copied, and 'destination_path', the path where the copied file will be saved. The tool enforces strict permission restrictions, allowing access only to files within the current working directory. Any attempt to copy files from or to locations outside this directory will result in an 'Access denied' error. The tool does not modify permissions, so users must ensure they have the necessary permissions before using the tool. Both the source and destination paths must be within the current working directory to avoid errors.
write_file:The 'write_file' tool enables you to save text to a file on your disk. It requires the following parameters:\n\n1. **file_path (str)**: The complete path where the file will be saved, including the directory and the file name. For example, 'Desktop/Ode_to_Autumn.txt'.\n\n2. **text (str)**: The content to be written to the file.\n\n3. **append (bool)**: A boolean indicating whether to append to an existing file. If set to 'false' (the default), the file will be overwritten if it already exists.\n\nThe tool returns a JSON object with a 'response' field indicating success or an 'error' field if any issues are encountered during the file writing process. Potential errors include invalid file paths or permission issues.\n\nNote: The tool does not automatically create directories. Ensure the directory path exists before using the tool.\n\nThere are no explicit file size limitations, but performance may vary based on system capabilities.\n\nExample Usage:\nTo save a poem to a file on your desktop:\n```\nParameters: {\n  'file_path': 'Desktop/Ode_to_Autumn.txt',\n  'text': 'Season of mists and mellow fruitfulness...',\n  'append': False\n}\nResponse: {\n  'response': 'File written successfully to Desktop/Ode_to_Autumn.txt.'\n}\n```\n\nTo append text to an existing file:\n```\nParameters: {\n  'file_path': 'Desktop/Ode_to_Autumn.txt',\n  'text': 'And still more, later flowers for the bees...',\n  'append': True\n}\nResponse: {\n  'response': 'Text appended successfully to Desktop/Ode_to_Autumn.txt.'\n}\n```
read_file:The read_file tool is designed to read the contents of a file from the disk. It requires a single parameter: 'file_path', which specifies the name of the file to be read. The tool is restricted to accessing files within the current working directory. If the specified file does not exist, is inaccessible, or cannot be read, the tool will return an error message, such as 'Error: no such file or directory'. To avoid errors, ensure the file path is correct and the file is located in the current working directory. It is also recommended to verify the file's presence and specify the correct file extension before attempting to read it.
move_file:The 'move_file' tool enables users to move or rename a file from one location to another on their system. It requires two parameters: 'source_path', which is the current path of the file, and 'destination_path', which is the new path for the file. The tool is equipped to handle common errors by providing descriptive error messages. For instance, if the source file does not exist, it will return an error message such as 'Error: no such file or directory'. If there are permission issues, it will return a 'permission denied' error. To ensure a successful operation, users should verify that the source file exists and that they have the necessary permissions to move it. A successful file move typically results in a confirmation message or an empty response, indicating the operation was completed without issues. The tool does not impose specific limitations on file size or type. Example usage: To move a file named 'Project_Report.docx' from 'Documents/Work' to 'Documents/Completed Projects', set 'source_path' to 'Documents/Work/Project_Report.docx' and 'destination_path' to 'Documents/Completed Projects/Project_Report.docx'. Users should also ensure there is enough space in the destination directory to accommodate the file being moved.
file_delete:The 'file_delete' tool allows users to delete a specified file from their system by providing the 'file_path' parameter, which specifies the path to the file intended for deletion. The tool will attempt to delete the file at the given location. If the file does not exist, an error message will be returned indicating that the file could not be found. Users must have the necessary permissions to delete files in the specified directory; otherwise, the tool will return an 'Access denied' error. The tool may only delete files within the current working directory if permissions are restricted, as indicated by permission-related errors. The tool's behavior may vary depending on the operating system, particularly concerning file path formats (e.g., Windows vs. Unix-like systems). A successful deletion will result in a confirmation message. To enhance user understanding, it is advisable to include examples of both successful and unsuccessful deletions, highlighting scenarios where permission issues may arise.
file_search:The 'file_search' tool enables users to recursively search for files within a specified subdirectory using a Unix shell-style wildcard pattern. The tool requires two parameters: 'dir_path', which specifies the subdirectory to search in, and 'pattern', which is a Unix shell-style wildcard pattern (e.g., '*.pdf') used to match file names. Note that extended globbing patterns (e.g., '*.{jpg,jpeg,png}') are not supported. If 'dir_path' is not specified, the tool defaults to searching in the current directory ('.'). The output includes a 'response' field that lists the full paths of files found matching the pattern, or a message indicating that no files were found. Additionally, an 'error' field captures any errors encountered during the search, such as non-existent directories or permission issues. Example usage: To find all PDF files in the 'documents/reports' directory, set 'dir_path' to 'documents/reports' and 'pattern' to '*.pdf'. If no files are found, the response will indicate this scenario.