Class FileSystemHashTool
Computes a cryptographic hash of a file on the local file system.
public sealed class FileSystemHashTool : IBuiltInTool, ITool, IToolMetadata
- Inheritance
-
FileSystemHashTool
- Implements
- Inherited Members
Examples
Verifying a download against an expected hash:
using LMKit.Agents;
using LMKit.Agents.Tools.BuiltIn.IO;
var agent = Agent.CreateBuilder(model)
.WithTools(t => t.Register(new FileSystemHashTool()))
.Build();
var result = await agent.RunAsync(@"Compute the SHA-256 of C:\downloads\setup.exe.");
Constructors
- FileSystemHashTool()
Initializes a new instance with default settings.
- FileSystemHashTool(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.