File read tool — read file contents with path validation.
FileReadTool(allowed_dirs: Optional[List[str]] = None)
Bases: BaseTool
Read file contents with optional directory restrictions.
Source code in src/openjarvis/tools/file_read.py
| def __init__(
self,
allowed_dirs: Optional[List[str]] = None,
) -> None:
self._allowed_dirs = [Path(d).resolve() for d in (allowed_dirs or [])]
|