Skip to main content

Search 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: search_tool

Tool description: Searches the internet (using Tavily) to find answers to the search query provided and returns those answers, including images, links and a natural language answer. The search tool has access to general information but can not return specific information on users or information not available on the internet

Usage notes:

This tool uses the Tavily API. You can sign up to obtain a Tavily API key () and set it in the environment variable TAVILY_API_KEY.

Args schema:

{
"description": "Input for SearchTool.",
"properties": {
"search_query": {
"description": "The query to search for. For example, 'what is the capital of France?' or 'who won the US election in 2020?'",
"title": "Search Query",
"type": "string"
}
},
"required": [
"search_query"
],
"title": "SearchToolSchema",
"type": "object"
}

Output schema:

('str', 'str: output of the search results')