Ansight.Tools.FileSystem 0.1.0-pre1

This is a prerelease version of Ansight.Tools.FileSystem.
dotnet add package Ansight.Tools.FileSystem --version 0.1.0-pre1
                    
NuGet\Install-Package Ansight.Tools.FileSystem -Version 0.1.0-pre1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ansight.Tools.FileSystem" Version="0.1.0-pre1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ansight.Tools.FileSystem" Version="0.1.0-pre1" />
                    
Directory.Packages.props
<PackageReference Include="Ansight.Tools.FileSystem" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Ansight.Tools.FileSystem --version 0.1.0-pre1
                    
#r "nuget: Ansight.Tools.FileSystem, 0.1.0-pre1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Ansight.Tools.FileSystem@0.1.0-pre1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Ansight.Tools.FileSystem&version=0.1.0-pre1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Ansight.Tools.FileSystem&version=0.1.0-pre1&prerelease
                    
Install as a Cake Tool

Ansight.Tools.FileSystem

Grouped sandboxed file access tool registrations for the Ansight .NET SDK.

Registered tools:

  • files.list_directory
  • files.read_file
  • files.download_file
  • files.begin_binary_download

Usage

using Ansight;
using Ansight.Tools.FileSystem;

var options = Options.CreateBuilder()
    .WithFileSystemTools()
    .WithReadOnlyToolAccess()
    .Build();

MCP-facing file transfer

files.begin_binary_download is the bridge-oriented path when an MCP caller wants the SDK to stream raw bytes over the pairing WebSocket and materialize the file in a caller-chosen local temp directory. The app SDK does not choose or know that temp path; it only returns metadata and then emits binary frames keyed by a transferId.

Binary download request arguments:

  • root: optional sandbox root alias
  • path: file path relative to the root
  • chunkBytes: maximum bytes to include in each binary websocket frame
  • downloadId: optional caller-supplied correlation id for mapping the transfer to a local temp file

Binary download response highlights:

  • downloadId, transferId
  • fileName, fileExtension, mimeType
  • sizeBytes, lastModifiedUtc, version
  • deliveryMode = websocket_binary
  • wireProtocol = ansight.file-transfer.v1

The consuming MCP bridge is expected to:

  • choose the temp directory and local file path
  • call files.begin_binary_download
  • map transferId to that local temp file
  • write incoming ASFT binary frames into the chosen file until the complete frame arrives

files.download_file remains available as a JSON fallback when the caller cannot consume binary websocket frames. It stays inside the configured sandbox roots, returns best-effort file metadata for tool selection, and pages large files through ordinary tool.result payloads.

JSON fallback request arguments:

  • root: optional sandbox root alias
  • path: file path relative to the root
  • offsetBytes: starting byte offset for the chunk
  • maxBytes: maximum bytes to return for the chunk
  • encoding: auto, utf8, or base64
  • expectedVersion: optional version token from a prior chunk

JSON fallback response highlights:

  • fileName, fileExtension, mimeType
  • sizeBytes, lastModifiedUtc, version
  • offsetBytes, bytesRead, hasMore, nextOffsetBytes
  • contentType, encoding, and either text or base64
  • nextRequest, which contains the next tool.call payload to continue the download safely

Configure additional tagged roots:

using Ansight;
using Ansight.Tools.FileSystem;

var options = Options.CreateBuilder()
    .WithFileSystemTools(fileSystem =>
    {
        fileSystem.AddRoot("logs", "/absolute/path/to/logs");
    })
    .WithReadOnlyToolAccess()
    .Build();
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-android35.0 is compatible.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-ios18.0 is compatible.  net9.0-maccatalyst was computed.  net9.0-maccatalyst18.0 is compatible.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net9.0

  • net9.0-android35.0

  • net9.0-ios18.0

  • net9.0-maccatalyst18.0

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-pre1 28 3/31/2026