Table of Contents

Class FileTools

Namespace
JD.AI.Core.Tools
Assembly
JD.AI.Core.dll

File system tools for the AI agent.

[ToolPlugin("file")]
public sealed class FileTools
Inheritance
FileTools
Inherited Members

Methods

EditFile(string, string, string)

[KernelFunction("edit_file")]
[ToolSafetyTier(SafetyTier.ConfirmOnce)]
public static string EditFile(string path, string oldStr, string newStr)

Parameters

path string
oldStr string
newStr string

Returns

string

ListDirectory(string?, int)

[KernelFunction("list_directory")]
[ToolSafetyTier(SafetyTier.ConfirmOnce)]
public static string ListDirectory(string? path = null, int maxDepth = 2)

Parameters

path string
maxDepth int

Returns

string

ReadFile(string, int?, int?)

[KernelFunction("read_file")]
[ToolSafetyTier(SafetyTier.ConfirmOnce)]
public static string ReadFile(string path, int? startLine = null, int? endLine = null)

Parameters

path string
startLine int?
endLine int?

Returns

string

WriteFile(string, string)

[KernelFunction("write_file")]
[ToolSafetyTier(SafetyTier.ConfirmOnce)]
public static string WriteFile(string path, string content)

Parameters

path string
content string

Returns

string