Class FileSystemDeleteTool
Deletes a file or directory from the local file system.
public sealed class FileSystemDeleteTool : IBuiltInTool, ITool, IToolMetadata
- Inheritance
-
FileSystemDeleteTool
- Implements
- Inherited Members
Examples
Restricting destructive deletion to a sandboxed directory:
using LMKit.Agents;
using LMKit.Agents.Tools.BuiltIn.IO;
var options = new FileSystemToolOptions
{
AllowedPaths = new HashSet<string> { @"C:\sandbox" }
};
var agent = Agent.CreateBuilder(model)
.WithTools(t => t.Register(new FileSystemDeleteTool(options)))
.Build();
Constructors
- FileSystemDeleteTool()
Initializes a new instance with default settings.
- FileSystemDeleteTool(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.