web_search
Search the web via Ollama's hosted API and get titles, URLs, and content snippets for any query. Adjust max results to control the number of returned items.
Instructions
Perform a web search using Ollama's hosted search API.
Requires OLLAMA_API_KEY environment variable to be set.
Args:
query: The search query to run.
max_results: Maximum results to return (default: 3, max: 20).
Returns:
JSON-serializable dict with search results including titles, URLs, and content snippets.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "web_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| max_results | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |