File Reader Tool
Usage
Portia offers both open source tools as well as a cloud-hosted library of tools to save you development time. You can dig into the specs of those tools in our open source repo (SDK repo ↗).
You can import our open source tools into your project using from portia.open_source_tools.registry import open_source_tool_registry
and load them into an InMemoryToolRegistry
object. You can also combine their use with cloud or custom tools as explained in the docs (Add custom tools ↗).
Tool details
Tool ID: file_reader_tool
Tool description: Finds and reads content from a local file on Disk
Args schema:
{
"description": "Schema defining the inputs for the FileReaderTool.",
"properties": {
"filename": {
"description": "The path (either full or relative) where the file should be read from",
"title": "Filename",
"type": "string"
}
},
"required": [
"filename"
],
"title": "FileReaderToolSchema",
"type": "object"
}
Output schema:
('str', 'A string dump or JSON of the file content')