Skip to main content
Glama
victormacaubas

web-search-mcp

web_search

Read-only

Search the web and retrieve titles, URLs, and snippets for a query. Uses DuckDuckGo without an API key, and the results can drive subsequent page fetches.

Instructions

Search the web and return titles, URLs, and text snippets for matching pages.

Uses DuckDuckGo as the search backend — no API key required. Results are suitable for driving follow-up fetches with WebFetch.

Args: params (WebSearchInput): Validated search parameters containing: - query (str): Search query, 1–500 characters, must not be whitespace-only. - max_results (int): Maximum results to return, 1–20 (default: 5). - region (str | None): Locale code such as "us-en" or "br-pt". When omitted the backend's worldwide default ("wt-wt") is used.

Returns: str: JSON-formatted string on success:

    {
        "results": [
            {
                "title": str,    # Page title
                "url": str,      # Full URL of the result
                "snippet": str   # Short excerpt from the page
            },
            ...
        ]
    }

    Or an error string on failure:

    "Error: <human-readable reason>"

Examples: - "Python asyncio tutorial" -> returns up to 5 results about asyncio - query="news", region="br-pt" -> returns Brazilian Portuguese news results - query=" " -> rejected by input validation before any search is performed

Error cases: - Whitespace-only or empty query: rejected by Pydantic validation - max_results outside 1–20: rejected by Pydantic validation - Backend failure (network error, rate limit, DuckDuckGo unavailable): returns "Error: Search failed: "

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false; the description adds valuable behavioral details: DuckDuckGo backend, no API key required, parameter validation rules, and error string return format. No contradiction with annotations.

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

Conciseness5/5

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

The description is thorough yet well-structured with sections for args, returns, examples, and errors. Every sentence adds value, covering validation, defaults, and error handling without redundancy.

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?

The description explains the return format (JSON string or error), provides usage examples, and lists error cases. Given the tool's simplicity, this is complete—no output schema needed beyond what is described.

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

Parameters5/5

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

The schema has zero property descriptions, but the description fully documents each parameter: query length/whitespace constraints, max_results range, and region locale codes with examples. This goes far beyond the structured schema.

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?

The description states 'Search the web and return titles, URLs, and text snippets for matching pages' – a specific verb and resource with clear output. Even without sibling tools, it unambiguously defines the tool's function.

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?

Provides clear usage context: 'Results are suitable for driving follow-up fetches with WebFetch' and includes examples for different queries and regions. No alternatives exist among sibling tools, so explicit when-not-to-use is unnecessary.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/victormacaubas/web-search-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server