Web Search Tool
Search the web and return titles, URLs, and snippets. Supports DuckDuckGo (default, no key needed) and Brave backends.
Tool Name
web_search
Parameters
| Key | Type | Default | Description |
|---|---|---|---|
query | string | โ | The search query (required) |
max_results | integer | 5 | Maximum number of results to return |
Backends
| Backend | API Key | How It Works |
|---|---|---|
| DuckDuckGo (default) | Not required | Fetches https://lite.duckduckgo.com/lite/ and parses HTML results |
| Brave | Required | Calls https://api.search.brave.com/res/v1/web/search JSON API |
Configuration
config.toml
[search]
backend = "duckduckgo" # or "brave"
api_key = "" # Required only for BraveOutput Format
Returns numbered markdown results:
text
1. [Page Title](https://example.com/page)
A brief snippet describing the page content...
2. [Another Result](https://example.com/other)
Another snippet...