Skip to content

Tools

Category: Agent

Source: tools.dart

Classes

ReadFileTool

A tool that reads file contents from disk.

Constructor

dart
ReadFileTool(this.workspace)

Properties

PropertyTypeDescription
workspaceWorkspace
nameString get
descriptionString get
parametersList<ToolParameter> get
nameString get
descriptionString get
parametersList<ToolParameter> get

Methods

Future<ToolResult> execute(Map<String, dynamic> args)

WriteFileTool

A tool that writes content to a file on disk.

Constructor

dart
WriteFileTool(this.workspace)

Properties

PropertyTypeDescription
workspaceWorkspace
nameString get
trustToolTrust get
descriptionString get
parametersList<ToolParameter> get
nameString get
trustToolTrust get
descriptionString get
parametersList<ToolParameter> get

Methods

Future<ToolResult> execute(Map<String, dynamic> args)

BashTool

A tool that runs shell commands and returns their output.

Constructor

dart
BashTool(this.executor)

Properties

PropertyTypeDescription
executorCommandExecutor
nameString get
trustToolTrust get
descriptionString get
parametersList<ToolParameter> get
nameString get
trustToolTrust get
descriptionString get
parametersList<ToolParameter> get

Methods

Future<ToolResult> execute(Map<String, dynamic> args)

GrepTool

A tool that searches for patterns in files using ripgrep-style semantics.

Constructor

dart
GrepTool(this.executor)

Properties

PropertyTypeDescription
executorCommandExecutor
nameString get
descriptionString get
parametersList<ToolParameter> get
workspaceWorkspace
nameString get
trustToolTrust get
descriptionString get
parametersList<ToolParameter> get
workspaceWorkspace
nameString get
descriptionString get
parametersList<ToolParameter> get
nameString get
descriptionString get
parametersList<ToolParameter> get
nameString get
trustToolTrust get
descriptionString get
parametersList<ToolParameter> get
nameString get
descriptionString get
parametersList<ToolParameter> get

Methods

Future<ToolResult> execute(Map<String, dynamic> args)
Future<ToolResult> execute(Map<String, dynamic> args)
Future<ToolResult> execute(Map<String, dynamic> args)

EditFileTool

A tool that edits files by replacing exact string matches.

Constructor

dart
EditFileTool(this.workspace)

Properties

PropertyTypeDescription
workspaceWorkspace
nameString get
trustToolTrust get
descriptionString get
parametersList<ToolParameter> get
nameString get
trustToolTrust get
descriptionString get
parametersList<ToolParameter> get

Methods

Future<ToolResult> execute(Map<String, dynamic> args)

ListDirectoryTool

A tool that lists directory contents.

Constructor

dart
ListDirectoryTool(this.workspace)

Properties

PropertyTypeDescription
workspaceWorkspace
nameString get
descriptionString get
parametersList<ToolParameter> get
nameString get
descriptionString get
parametersList<ToolParameter> get

Methods

Future<ToolResult> execute(Map<String, dynamic> args)

Released under the MIT License.