web_search
Searches the web for one query and returns up to 10 titles, URLs, and snippets to discover topic links; then fetch full page content from chosen URLs.
Instructions
What it does: Runs a web search for one query via Ollama's web search API. Returns a list of results. Each result has a title, a URL, and a short text snippet. Use this to discover links by topic; then use web_fetch to get full page content for any URL you choose.
When to use: Use when the user wants to search the web by query, explore a topic, or find URLs about something. After you get results, pick one or more URLs from the list and call web_fetch with that URL to retrieve the full page as markdown.
Workflow: Call this tool with a query (e.g. "Ollama new engine", "Deno router tutorial"). You get back up to 10 results (title, url, snippet per result). To read a full page, call web_fetch with the url from the result. One query per call; for multiple topics, call web_search once per query.
Rules and limits:
Query is required. max_results is optional (default 5, max 10).
Requires OLLAMA_API_KEY in the environment or MCP server config (e.g. from your Ollama account).
Read-only, no side effects. Results may be cached by the search provider.
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 | The search query string. | |
| max_results | No | Maximum number of results to return (default 5, max 10). |