WorkspaceTools
Factory object for creating workspace tools with consistent schemas and handlers. This eliminates duplication across different use cases while allowing customization of handler behavior and return types.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
WorkspaceTools.type
Members list
Value members
Concrete methods
Creates a complete set of workspace tools using default handlers. This is equivalent to the original createWorkspaceTools method but using the factory methods.
Creates a complete set of workspace tools using default handlers. This is equivalent to the original createWorkspaceTools method but using the factory methods.
Attributes
Create an execute command tool that runs shell commands.
Create an execute command tool that runs shell commands.
Type parameters
- T
-
Return type of the handler
Value parameters
- handler
-
Custom handler function for parameter extraction and result transformation
- includeTimeout
-
Whether to include timeout parameter
- includeWorkingDir
-
Whether to include working_directory parameter
- workspace
-
The workspace to operate on
Attributes
- Returns
-
A configured ToolFunction
Create an explore files tool that lists files and directories.
Create an explore files tool that lists files and directories.
Type parameters
- T
-
Return type of the handler
Value parameters
- handler
-
Custom handler function for parameter extraction and result transformation
- includeRecursive
-
Whether to include recursive parameter in schema
- workspace
-
The workspace to operate on
Attributes
- Returns
-
A configured ToolFunction
Create a modify file tool that performs operations like replace, insert, or delete.
Create a modify file tool that performs operations like replace, insert, or delete.
Type parameters
- T
-
Return type of the handler
Value parameters
- handler
-
Custom handler function for parameter extraction and result transformation
- workspace
-
The workspace to operate on
Attributes
- Returns
-
A configured ToolFunction
Create a read file tool that reads file contents.
Create a read file tool that reads file contents.
Type parameters
- T
-
Return type of the handler
Value parameters
- handler
-
Custom handler function for parameter extraction and result transformation
- includeLineParams
-
Whether to include start_line and end_line parameters
- workspace
-
The workspace to operate on
Attributes
- Returns
-
A configured ToolFunction
Create a search files tool that searches for content in files.
Create a search files tool that searches for content in files.
Type parameters
- T
-
Return type of the handler
Value parameters
- handler
-
Custom handler function for parameter extraction and result transformation
- includeRecursive
-
Whether to include recursive parameter
- includeSearchType
-
Whether to include search_type parameter
- workspace
-
The workspace to operate on
Attributes
- Returns
-
A configured ToolFunction
Create a write file tool that writes content to files.
Create a write file tool that writes content to files.
Type parameters
- T
-
Return type of the handler
Value parameters
- handler
-
Custom handler function for parameter extraction and result transformation
- includeCreateDirs
-
Whether to include create_directories parameter
- workspace
-
The workspace to operate on
Attributes
- Returns
-
A configured ToolFunction
Default handler for execute tool that returns ujson.Value
Default handler for execute tool that returns ujson.Value
Attributes
Default handler for explore tool that returns ujson.Value
Default handler for explore tool that returns ujson.Value
Attributes
Default handler for modify tool that returns ujson.Value
Default handler for modify tool that returns ujson.Value
Attributes
Default handler for read tool that returns ujson.Value
Default handler for read tool that returns ujson.Value
Attributes
Default handler for search tool that returns ujson.Value
Default handler for search tool that returns ujson.Value
Attributes
Default handler for write tool that returns ujson.Value
Default handler for write tool that returns ujson.Value