WriteFileTool

Writes UTF-8 text to a file, sandboxed to external storage via PathValidator. mode is create (default; fails if the file exists), overwrite or append. Parent directories are created only with create_dirs. Content is capped at MAX_CHARS characters. Nothing under Android/ (other apps' data) can be written. On API 30+ only this app's own files and new files in shared folders such as Download/ or Documents/ are writable; see FilesTools for API 28-29. Output: path, bytes_written, size_bytes (file size afterwards), created.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open override val annotations: ToolAnnotations
Link copied to clipboard
open override val description: String
Link copied to clipboard
open override val name: String
Link copied to clipboard
open override val outputSchema: Map<String, Any>
Link copied to clipboard
open override val parameters: List<ToolParameter>

Functions

Link copied to clipboard
open suspend override fun execute(params: Map<String, Any>): ToolResult