Skip to main content
Glama
misanthropic-ai

DuckDuckGo MCP Server

ddg-news-search

Search for news articles using DuckDuckGo with options to filter by region, time, and safety level to find relevant current information.

Instructions

Search for news articles using DuckDuckGo

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keywordsYesSearch query keywords
regionNoRegion code (e.g., wt-wt, us-en, uk-en)wt-wt
safesearchNoSafe search levelmoderate
timelimitNoTime limit (d=day, w=week, m=month)
max_resultsNoMaximum number of results to return

Implementation Reference

  • Executes the ddg-news-search tool: extracts arguments, performs news search using DuckDuckGo's DDGS().news(), formats results into a numbered list with title, source, date, URL, and body.
    elif name == "ddg-news-search":
        keywords = arguments.get("keywords")
        if not keywords:
            raise ValueError("Missing keywords")
        
        region = arguments.get("region", "wt-wt")
        safesearch = arguments.get("safesearch", "moderate")
        timelimit = arguments.get("timelimit")
        max_results = arguments.get("max_results", 10)
        
        # Perform search
        ddgs = DDGS()
        results = ddgs.news(
            keywords=keywords,
            region=region,
            safesearch=safesearch,
            timelimit=timelimit,
            max_results=max_results
        )
        
        # Format results
        formatted_results = f"News search results for '{keywords}':\n\n"
        for i, result in enumerate(results, 1):
            formatted_results += (
                f"{i}. {result.get('title', 'No title')}\n"
                f"   Source: {result.get('source', 'Unknown')}\n"
                f"   Date: {result.get('date', 'No date')}\n"
                f"   URL: {result.get('url', 'No URL')}\n"
                f"   {result.get('body', 'No description')}\n\n"
            )
        
        return [
            types.TextContent(
                type="text",
                text=formatted_results,
            )
        ]
  • Registers the ddg-news-search tool in the list_tools() response, including its description and input JSON schema.
    types.Tool(
        name="ddg-news-search",
        description="Search for news articles using DuckDuckGo",
        inputSchema={
            "type": "object",
            "properties": {
                "keywords": {"type": "string", "description": "Search query keywords"},
                "region": {"type": "string", "description": "Region code (e.g., wt-wt, us-en, uk-en)", "default": "wt-wt"},
                "safesearch": {"type": "string", "enum": ["on", "moderate", "off"], "description": "Safe search level", "default": "moderate"},
                "timelimit": {"type": "string", "enum": ["d", "w", "m"], "description": "Time limit (d=day, w=week, m=month)"},
                "max_results": {"type": "integer", "description": "Maximum number of results to return", "default": 10},
            },
            "required": ["keywords"],
        },
    ),
  • Defines the input schema for the ddg-news-search tool, specifying properties like keywords (required), region, safesearch, timelimit, max_results.
    inputSchema={
        "type": "object",
        "properties": {
            "keywords": {"type": "string", "description": "Search query keywords"},
            "region": {"type": "string", "description": "Region code (e.g., wt-wt, us-en, uk-en)", "default": "wt-wt"},
            "safesearch": {"type": "string", "enum": ["on", "moderate", "off"], "description": "Safe search level", "default": "moderate"},
            "timelimit": {"type": "string", "enum": ["d", "w", "m"], "description": "Time limit (d=day, w=week, m=month)"},
            "max_results": {"type": "integer", "description": "Maximum number of results to return", "default": 10},
        },
        "required": ["keywords"],
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool searches for news articles but doesn't cover critical aspects like whether it's read-only (implied but not explicit), rate limits, authentication needs, pagination, or error handling. For a search tool with external dependencies, this is a significant gap in transparency.

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 extremely concise—a single sentence—and front-loaded with the core purpose. There's no wasted language or redundancy, making it efficient for quick understanding. Every word earns its place by directly stating the tool's function.

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

Completeness2/5

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

Given the tool's complexity (5 parameters, no annotations, no output schema), the description is incomplete. It doesn't address behavioral traits, usage context, or output format, leaving gaps that could hinder effective tool invocation. For a search tool with multiple parameters and no structured output documentation, more detail is needed.

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?

The description adds no parameter-specific information beyond what the input schema provides. Since schema description coverage is 100%, the baseline score is 3. The description doesn't explain parameter interactions, default behaviors, or practical examples, so it doesn't enhance the schema's documentation.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Search for news articles using DuckDuckGo'. It specifies the verb ('Search') and resource ('news articles'), and distinguishes it from sibling tools like ddg-image-search and ddg-video-search by focusing on news. However, it doesn't explicitly differentiate from ddg-text-search, which might also return news results, keeping it from a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like ddg-text-search or ddg-ai-chat, nor does it specify scenarios where news search is preferred over general text search or other media types. This lack of comparative context leaves the agent without clear usage directives.

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/misanthropic-ai/ddg-mcp'

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