Table of Contents

Class FileSystemReadTool

Namespace
LMKit.Agents.Tools.BuiltIn.IO
Assembly
LM-Kit.NET.dll

Reads the contents of a file from the local file system.

public sealed class FileSystemReadTool : IBuiltInTool, ITool, IToolMetadata
Inheritance
FileSystemReadTool
Implements
Inherited Members

Examples

Letting an agent read a config file before making a recommendation:

using LMKit.Agents;
using LMKit.Agents.Tools.BuiltIn.IO;

var agent = Agent.CreateBuilder(model) .WithTools(t => t.Register(new FileSystemReadTool())) .Build();

var result = await agent.RunAsync(@"Read C:\app\appsettings.json and explain the connection-string entry.");

Constructors

FileSystemReadTool()

Initializes a new instance with default settings.

FileSystemReadTool(FileSystemToolOptions)

Initializes a new instance with custom options.

Properties

Description

Gets a concise description of what the tool does.

InputSchema

Gets the JSON Schema defining the expected input arguments.

Name

Gets the stable, unique identifier for this tool.

Methods

InvokeAsync(string, CancellationToken)

Executes the tool with the specified JSON arguments.

Share