FileSystem

Configure the React Native native file-system tools to list, read, download, push, copy, move, and delete files inside approved roots.

Register the Suite

await Ansight.initializeAndActivate(
  Ansight.createOptionsBuilder()
    .withFileSystemTools({
      additionalRoots: [{ alias: "exports", path: "/tmp/app-exports" }],
    })
    .withReadOnlyToolAccess()
    .build(),
);

Registration API

  • withFileSystemTools(options): configures native file-system tool options.
  • remoteTools.fileSystem.additionalRoots: exposes additional approved roots.

Specific Concerns

  • All access is constrained to approved native roots.
  • File contents are sensitive even when only read tools are enabled.
  • Write tools require withReadWriteToolAccess() or withAllToolAccess().
  • Critical tools such as files.delete_file require withAllToolAccess().

Tool Matrix

NameIdPolicyDescription
List Directoryfiles.list_directoryReadLists files and folders inside approved roots.
Read Filefiles.read_fileReadReads a constrained file.
Get File Checksumfiles.get_file_checksumReadComputes file checksums.
Download Filefiles.download_fileReadDownloads chunks through JSON fallback.
Begin Binary Downloadfiles.begin_binary_downloadReadStarts binary download for a constrained file.
Push Filefiles.push_fileWriteWrites caller-provided content into an approved root.
Copy Filefiles.copy_fileWriteCopies a constrained file.
Move Filefiles.move_fileWriteMoves or renames a constrained file.
Delete Filefiles.delete_fileCriticalDeletes a constrained file.

Tool Details

Use read tools for inspection and download. Enable write and critical tools only for specific local repair workflows.