Tools
Category: Agent
Source: tools.dart
Classes
ReadFileTool
A tool that reads file contents from disk.
Constructor
dart
ReadFileTool(this.workspace)Properties
| Property | Type | Description |
|---|---|---|
workspace | Workspace | |
name | String get | |
description | String get | |
parameters | List<ToolParameter> get | |
name | String get | |
description | String get | |
parameters | List<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
| Property | Type | Description |
|---|---|---|
workspace | Workspace | |
name | String get | |
trust | ToolTrust get | |
description | String get | |
parameters | List<ToolParameter> get | |
name | String get | |
trust | ToolTrust get | |
description | String get | |
parameters | List<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
| Property | Type | Description |
|---|---|---|
executor | CommandExecutor | |
name | String get | |
trust | ToolTrust get | |
description | String get | |
parameters | List<ToolParameter> get | |
name | String get | |
trust | ToolTrust get | |
description | String get | |
parameters | List<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
| Property | Type | Description |
|---|---|---|
executor | CommandExecutor | |
name | String get | |
description | String get | |
parameters | List<ToolParameter> get | |
workspace | Workspace | |
name | String get | |
trust | ToolTrust get | |
description | String get | |
parameters | List<ToolParameter> get | |
workspace | Workspace | |
name | String get | |
description | String get | |
parameters | List<ToolParameter> get | |
name | String get | |
description | String get | |
parameters | List<ToolParameter> get | |
name | String get | |
trust | ToolTrust get | |
description | String get | |
parameters | List<ToolParameter> get | |
name | String get | |
description | String get | |
parameters | List<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
| Property | Type | Description |
|---|---|---|
workspace | Workspace | |
name | String get | |
trust | ToolTrust get | |
description | String get | |
parameters | List<ToolParameter> get | |
name | String get | |
trust | ToolTrust get | |
description | String get | |
parameters | List<ToolParameter> get |
Methods
Future<ToolResult> execute(Map<String, dynamic> args)
ListDirectoryTool
A tool that lists directory contents.
Constructor
dart
ListDirectoryTool(this.workspace)Properties
| Property | Type | Description |
|---|---|---|
workspace | Workspace | |
name | String get | |
description | String get | |
parameters | List<ToolParameter> get | |
name | String get | |
description | String get | |
parameters | List<ToolParameter> get |