search_and_chat
Search the web and receive an AI-generated answer based on live results. Combines web search and chat completion to answer questions with up-to-date information.
Instructions
Perform web search and then generate a response based on the search results.
This is a convenience tool that combines web_search and chat_completion.
Requires OLLAMA_API_KEY environment variable to be set for web search.
Args:
query: The search query and question to answer.
search_results: Number of search results to include (default: 3).
model: Optional model override.
temperature: Sampling temperature for chat completion.
Returns:
JSON-serializable dict with search results and AI response.
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": "search_and_chat"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | ||
| query | Yes | ||
| temperature | No | ||
| search_results | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |