Repository navigation
Tools
IbrahimAzab edited this page Jan 10, 2026
·
1 revision
Maestro V2 includes an extensible tool system that agents can use to perform actions.
| Tool | Description | Used By |
|---|---|---|
file_read |
Read file contents | All agents |
file_write |
Write to files | Developer, Docs |
file_list |
List directory | All agents |
web_search |
DuckDuckGo search | Research |
code_executor |
Run Python code | Developer |
Reads the contents of a file.
result = await file_read.execute(file_path="/path/to/file.txt")
# Returns: {"content": "file contents...", "size": 1234}Writes content to a file. Creates directories if needed.
result = await file_write.execute(
file_path="/path/to/file.txt",
content="Hello, World!"
)Lists files and directories.
result = await file_list.execute(directory="/path/to/dir")
# Returns: {"items": [...], "count": 10}Searches the web using DuckDuckGo.
result = await web_search.execute(
query="FastAPI best practices",
num_results=5
)
# Returns: {"results": [{"title": "...", "snippet": "...", "url": "..."}]}Executes Python code in a sandboxed environment.
Safety Features:
- 30-second timeout
- Restricted builtins
- No network access
- No file system access outside sandbox
result = await code_executor.execute(
code="print('Hello from sandbox!')",
language="python"
)
# Returns: {"stdout": "Hello from sandbox!", "exit_code": 0}Extend BaseTool to create your own tools:
from tools import BaseTool, ToolResult
class MyCustomTool(BaseTool):
name = "my_tool"
description = "Does something useful"
async def execute(self, **kwargs) -> ToolResult:
# Your logic here
return ToolResult(success=True, data={"result": "done"})