Skip to main content
Glama
WebSearch MCP

WebSearch MCP

by NeaByteLab

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

NameRequiredDescriptionDefault
queryYesThe search query string.
max_resultsNoMaximum number of results to return (default 5, max 10).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description carries the full behavioral burden. It discloses the auth requirement (OLLAMA_API_KEY), read-only/no side effects, result-shape (title, url, snippet), result cap, and caching by the provider. It does not cover failure modes, rate limits, or error behavior, so it is strong but not exhaustive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well front-loaded with 'What it does' first, then usage, workflow, and limits. Mild redundancy: the web_fetch hand-off is stated twice and the max_results default is repeated from the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter, single-purpose search tool with no output schema, everything needed to call it correctly and chain into web_fetch is present: scope, result shape, result count, auth prerequisite, and read-only nature.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so both parameters are already documented, establishing a baseline of 3. The description reinforces the default/max for max_results and adds the one-query-per-call constraint, but supplies no syntax or format guidance for the query string itself.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Runs a web search for one query via Ollama's web search API') and explicitly contrasts with the sibling web_fetch ('use web_fetch to get full page content'). An agent can distinguish the two without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use criteria ('when the user wants to search the web by query, explore a topic, or find URLs') and names the alternative tool plus the condition that selects it. It also covers the multi-topic case: 'for multiple topics, call web_search once per query.'

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools