Skip to main content
Glama
geosp
by geosp

get_web_search_summaries

Obtain web search summaries to quickly identify available sources and understand topic scope before deeper research, providing titles, URLs, and brief descriptions.

Instructions

Get lightweight web search results with only result summaries.

Use this when you need a quick overview of available sources without full content. This gets search result titles, URLs, and descriptions for quick research or when you only need an overview of available information.

Use this when you want to quickly understand what information is available on a topic before diving deeper with full content extraction.

Args: query: Search query string (1-200 characters) limit: Number of search result summaries to return (1-10, default 5) top_n: Alternative name for limit (for compatibility) recency_days: Days to look back for recent content (time filtering) source: Content type filter ("news", "images", "videos", etc.) language: Language filter (e.g., "en", "es", "fr", "de") country: Geographic filter (e.g., "US", "GB", "FR", "DE")

Returns: Formatted text containing search result summaries (title, URL, description)

Parameter Usage Guidelines

query (required)

  • Search query string (1-200 characters)

  • Use specific, descriptive search terms

limit (optional, default 5)

  • Range: 1-10 results

Usage Examples

Basic topic exploration:

{
  "query": "artificial intelligence ethics"
}

Quick source discovery:

{
  "query": "kubernetes security best practices",
  "limit": 3
}

Recent news exploration:

{
  "query": "AI developments",
  "source": "news",
  "recency_days": 7,
  "language": "en"
}

Geographic research:

{
  "query": "renewable energy policies",
  "country": "DE",
  "language": "en",
  "limit": 8
}

Content type discovery:

{
  "query": "machine learning tutorials",
  "source": "videos",
  "limit": 5
}

Complete parameter example:

{
  "query": "climate change adaptation strategies",
  "limit": 6,
  "recency_days": 30,
  "language": "en",
  "country": "US"
}

When to Choose This Tool

Primary Decision Criteria:

  • Choose this for initial research phase: Understand what sources are available

  • Choose this for topic exploration: Get an overview before deep diving

  • Choose this for source identification: Find relevant URLs for later extraction

  • Choose this for quick fact-checking: Verify if information sources exist

  • Choose this for research planning: Identify the scope of available information

Decision Matrix: When to Use Each Tool

Use get_web_search_summaries when:

  • ✅ You need to explore what's available on a topic

  • ✅ You want to identify relevant sources quickly

  • ✅ You're doing preliminary research

  • ✅ You need to validate if sources exist

  • ✅ You want to see search result diversity

  • ✅ Speed is more important than content depth

Use full_web_search when:

  • ✅ You need actual content from sources

  • ✅ You're doing detailed research or analysis

  • ✅ You need to cite or reference specific information

  • ✅ You want to compare information across sources

  • ✅ Content depth is more important than speed

Use get_single_web_page_content when:

  • ✅ You have specific URLs to extract

  • ✅ You found relevant URLs from summaries

  • ✅ You need to extract from known sources

Workflow Patterns

Two-stage research:

  1. Use get_web_search_summaries to identify sources

  2. Use get_single_web_page_content on promising URLs

  3. Or use full_web_search with focused query

Topic mapping:

  1. Use get_web_search_summaries with broad terms

  2. Analyze result diversity and topics

  3. Use full_web_search for detailed investigation

Source validation:

  1. Use get_web_search_summaries to check if sources exist

  2. Evaluate source quality and relevance

  3. Proceed with content extraction if validated

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
limitNo
top_nNo
recency_daysNo
sourceNo
languageNo
countryNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler 'get_web_search_summaries': processes input parameters, calls WebSearchService.search_summaries, formats results as formatted text response for MCP protocol.
    @mcp.tool()
    @inject_docstring(lambda: load_instruction("instructions_summaries.md", __file__))
    async def get_web_search_summaries(
        query: str, 
        limit: int = 5,
        top_n: int = None,  # Alternative name for limit (for compatibility)
        recency_days: int = None,  # Days to look back (now supported!)
        source: str = None,  # Source type filter (partially supported)
        language: str = None,  # Language filter (now supported!)
        country: str = None  # Country filter (now supported!)
    ) -> Dict[str, Any]:
        """Lightweight web search returning only summaries"""
        try:
            # Handle alternative parameter names
            actual_limit = top_n if top_n is not None else limit
            
            # Prepare supported parameters
            search_params = {}
            if recency_days is not None:
                search_params['recency_days'] = recency_days
                logger.info(f"Using recency_days filter: {recency_days} days")
            if source is not None:
                search_params['source'] = source
                logger.info(f"Using source filter: '{source}'")
            if language is not None:
                search_params['language'] = language
                logger.info(f"Using language filter: '{language}'")
            if country is not None:
                search_params['country'] = country
                logger.info(f"Using country filter: '{country}'")
                
            logger.info(f"MCP tool get_web_search_summaries: query='{query}', limit={actual_limit}")
    
            result = await web_search_service.search_summaries(
                query=query,
                limit=min(actual_limit, 10),  # Cap at 10
                **search_params  # Pass all supported parameters to service
            )
    
            # Format for MCP response
            response_text = f"Search summaries for '{result['query']}' with {result['total_results']} results:\n\n"
    
            for i, summary in enumerate(result['results'], 1):
                response_text += f"**{i}. {summary['title']}**\n"
                response_text += f"URL: {summary['url']}\n"
                response_text += f"Description: {summary['description']}\n\n---\n\n"
    
            logger.info(f"MCP tool get_web_search_summaries completed: {result['total_results']} results")
    
            return {
                "content": [{"type": "text", "text": response_text}]
            }
    
        except Exception as e:
            logger.error(f"MCP tool get_web_search_summaries error: {e}")
            raise
  • Registration function 'register_tool' that defines and registers the 'get_web_search_summaries' MCP tool (and others) using @mcp.tool() decorators inside it.
    def register_tool(mcp: FastMCP, web_search_service: WebSearchService) -> None:
        """
        Register web search tools with the MCP server
    
        Args:
            mcp: FastMCP server instance
            web_search_service: WebSearchService instance
        """
  • Core helper method 'search_summaries' in WebSearchService: performs lightweight multi-engine web search (DDGS/Brave/DuckDuckGo), returns structured summaries used by the MCP handler.
    async def search_summaries(self, query: str, limit: int = 5, **kwargs) -> Dict[str, Any]:
        """Lightweight search returning only summaries using multi-engine approach"""
        logger.info(f"Starting multi-engine search for summaries: '{query}' with parameters: {kwargs}")
    
        # Use multi-engine search instead of just Brave API
        results = await self._multi_engine_search(query, limit, **kwargs)
        
        # Format results as summaries (no content extraction needed)
        return {
            "query": query,
            "results": [
                {
                    "title": r.title, 
                    "url": r.url, 
                    "description": r.description, 
                    "timestamp": r.timestamp
                } for r in results
            ],
            "total_results": len(results),
            "status": "success"
        }
  • Pydantic schema model SearchSummaryModel defining the structure of individual search summary results returned by the service.
    class SearchSummaryModel(BaseModel):
        """Search result summary (no content)"""
        title: str = Field(..., description="Page title")
        url: str = Field(..., description="Page URL")
        description: str = Field(..., description="Search result description")
        timestamp: Optional[str] = Field(None, description="Timestamp")
  • Supporting helper '_multi_engine_search': orchestrates fallback across multiple search engines (DDGS preferred, then Brave, DuckDuckGo) with parameter support and quality assessment.
    async def _multi_engine_search(self, query: str, limit: int, **kwargs) -> List[SearchResult]:
        """Try multiple search engines in order of preference"""
        engines = [
            ("DDGS", self._search_ddgs),  # DDGS with Brave/DDG backends (highest priority)
            ("Brave", self._search_brave),  # Browser-based Brave (fallback)
            ("DuckDuckGo", self._search_duckduckgo)  # Browser-based DDG (last resort)
        ]
    
        for engine_name, engine_func in engines:
            try:
                logger.info(f"Trying {engine_name} search engine")
                results = await engine_func(query, limit, **kwargs)
                if results and self._assess_result_quality(results, query) >= 0.3:
                    logger.info(f"Using results from {engine_name}: {len(results)} results")
                    return results[:limit]
            except Exception as e:
                logger.warning(f"Search engine {engine_name} failed: {e}")
                continue
    
        logger.warning("All search engines failed, returning empty results")
        return []
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well by explaining the tool returns 'lightweight' results with 'only result summaries' for 'quick overview', specifying the output format as 'Formatted text containing search result summaries (title, URL, description)', and providing usage examples. It doesn't mention rate limits or authentication needs, but covers the core behavior thoroughly.

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

Conciseness3/5

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

The description is comprehensive but lengthy with multiple sections (Args, Returns, Parameter Usage Guidelines, Usage Examples, When to Choose This Tool, Decision Matrix, Workflow Patterns). While well-structured and front-loaded with the core purpose, it could be more concise by integrating some sections. Every sentence adds value, but the overall length is substantial.

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?

Given the 7-parameter complexity, 0% schema coverage, no annotations, but with an output schema, the description is exceptionally complete. It covers purpose, usage guidelines, parameter semantics, behavioral context, sibling tool comparisons, and workflow patterns. The output schema handles return values, so the description appropriately focuses on usage context.

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

Parameters4/5

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

With 0% schema description coverage, the description compensates well by listing all 7 parameters with brief explanations in the Args section, providing a 'Parameter Usage Guidelines' section for the two most important parameters, and showing 6 detailed usage examples that demonstrate how parameters work together. It adds significant meaning beyond the bare 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 clearly states the tool's purpose as 'Get lightweight web search results with only result summaries' and distinguishes it from siblings by specifying it's for 'quick overview of available sources without full content'. It explicitly contrasts with 'full_web_search' which provides actual content, making the distinction clear.

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?

The description provides extensive guidance including a 'When to Choose This Tool' section, a detailed decision matrix comparing it to sibling tools, workflow patterns, and explicit criteria like 'Choose this for initial research phase' and 'Speed is more important than content depth'. It clearly states when to use this tool versus 'full_web_search' and 'get_single_web_page_content'.

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/geosp/mcp-mixsearch'

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