Text Editing Toolset Documentation#

Generated byAI

This toolset provides tools for reading, creating, and modifying text-based files within the current directory.

read_text_file#

Reads the content of a specified text-based file in the current directory. Supports plain text, code files, markdown, and other text-based formats.

Parameters#

Parameter Type Required Description
file_path String Yes The relative path to the text file to read.

Notes#

  • Ensures the file is within the current directory and is not a binary file.
  • Supports plain text, code files, markdown, and other text-based formats.

replace_text_in_text_file#

Searches for the specified text in a text-based file and replaces it with alternative text. Ensures the file is within the current directory and is a text file.

Parameters#

Parameter Type Required Description
file_path String Yes The relative path to the file where you want to perform the replacement.
search String Yes The text to search for in the file.
replace_with String Yes The text to use to replace the text we searched for in the file.

Notes#

  • Ensures the file is within the current directory and is a text file.
  • Counts changes made to detect if nothing was modified.

write_text_file#

Write a text file with the given content, ensuring path to file is within current directory. Create entire path to the file if needed. DOES NOT overwrite existing file unless requested.

Parameters#

Parameter Type Required Description
file_path String Yes The relative path where the text file will be created.
content String Yes The content to write into the text file.
overwrite Boolean No Set to true to overwrite existing file; default is false.

Notes#

  • Ensures the file is created within the current directory.
  • Does not overwrite existing files unless asked to do so.