Skip to main content
Glama
geosp
by geosp

full_web_search

Perform comprehensive web searches with full page content extraction for detailed research and analysis across multiple sources.

Instructions

Get comprehensive web search results with full page content extraction.

Use this when you need detailed content from web sources for comprehensive research and analysis. This searches the web and extracts the full content from each result page.

Use this for comprehensive research or detailed information from web sources.

Args: query: Search query string (1-200 characters) limit: Number of results to return with full content (1-10, default 5) include_content: Whether to extract full page content (default true) max_content_length: Maximum characters per result content (0 = no limit) 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 results with full extracted content

Parameter Usage Guidelines

query (required)

  • Search query string (1-200 characters)

  • Use specific, descriptive search terms

limit (optional, default 5)

  • Range: 1-10 results

  • Higher limits take longer due to content extraction

include_content (optional, default true)

  • Set to true for full content extraction (default)

  • Set to false to get only titles, URLs, and descriptions

max_content_length (optional, default unlimited)

  • Limits characters per result to manage response size

  • Common values: 10000 (focused content), 50000 (detailed research), null (no limit)

top_n (optional, compatibility parameter)

  • Alternative name for limit parameter

  • Range: 1-10 results

recency_days (optional, time filtering)

  • Filters results to recent content only

  • Common values: 1 (past day), 7 (past week), 30 (past month), 365 (past year)

  • Use -1 or null for no time filter

source (optional, content type filtering)

  • Filters by content type

  • Supported values:

    • "news": News articles and current events

    • "images": Image search results

    • "videos": Video content

    • "web" or null: Regular web search (default)

language (optional, language filtering)

  • Filters results by language

  • Supported values: Language codes like "en", "es", "fr", "de", "zh"

country (optional, geographic filtering)

  • Filters results by geographic region/country

  • Supported values: Country codes like "US", "GB", "FR", "DE", "CA"

Usage Examples

Basic search with default settings:

{
  "query": "sustainable energy solutions 2024"
}

Quick overview (smaller limit):

{
  "query": "latest AI developments",
  "limit": 3
}

Recent news search with time filtering:

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

Geographic and language filtering:

{
  "query": "climate change policy",
  "country": "FR",
  "language": "fr",
  "limit": 5
}

Comprehensive research with all parameters:

{
  "query": "machine learning frameworks comparison",
  "limit": 8,
  "include_content": true,
  "max_content_length": 25000,
  "recency_days": 30,
  "language": "en"
}
{
  "query": "python tutorial",
  "source": "videos",
  "limit": 5,
  "include_content": false
}

Source identification only:

{
  "query": "quantum computing breakthroughs",
  "limit": 5,
  "include_content": false
}

When to Use This

  • Use when you need detailed content from multiple sources

  • Use for comprehensive research on complex topics

  • Use when analyzing and comparing information across sources

  • Use for gathering supporting evidence or documentation

  • Use when you need the full context from web pages

  • For quick topic exploration without content, use the search summaries functionality

  • When you have a specific URL to extract, use the single page content extraction functionality

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
limitNo
include_contentNo
max_content_lengthNo
top_nNo
recency_daysNo
sourceNo
languageNo
countryNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The primary handler function for the MCP tool 'full_web_search'. Registered via @mcp.tool() decorator within the register_tool function. Handles parameters, invokes WebSearchService, formats search results into MCP-compatible text content.
    @mcp.tool()
    @inject_docstring(lambda: load_instruction("instructions.md", __file__))
    async def full_web_search(
        query: str,
        limit: int = 5,
        include_content: bool = True,
        max_content_length: int = None,
        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]:
        """Comprehensive web search with full content extraction"""
        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 full_web_search: query='{query}', limit={actual_limit}")
    
            result = await web_search_service.search_and_extract(
                query=query,
                limit=min(actual_limit, 10),  # Cap at 10
                max_content_length=max_content_length,
                include_content=include_content,
                **search_params  # Pass all supported parameters to service
            )
    
            # Format for MCP response
            response_text = f"Search completed for '{result['query']}' with {result['total_results']} results:\n\n"
    
            for i, search_result in enumerate(result['results'], 1):
                response_text += f"**{i}. {search_result['title']}**\n"
                response_text += f"URL: {search_result['url']}\n"
                response_text += f"Description: {search_result['description']}\n"
    
                if search_result.get('full_content'):
                    content = search_result['full_content']
                    if max_content_length and len(content) > max_content_length:
                        content = content[:max_content_length] + f"\n\n[Content truncated at {max_content_length} characters]"
                    response_text += f"\n**Full Content:**\n{content}\n"
                elif search_result.get('content_preview'):
                    response_text += f"\n**Content Preview:**\n{search_result['content_preview']}\n"
                elif search_result.get('fetch_status') == 'error':
                    response_text += f"\n**Content Extraction Failed:** {search_result.get('error', 'Unknown error')}\n"
    
                response_text += "\n---\n\n"
    
            logger.info(f"MCP tool full_web_search completed: {result['total_results']} results")
    
            return {
                "content": [{"type": "text", "text": response_text}]
            }
    
        except Exception as e:
            logger.error(f"MCP tool full_web_search error: {e}")
            raise
  • Core helper method in WebSearchService that performs multi-engine web search and optional content extraction, called directly by the tool handler.
    async def search_and_extract(self, query: str, limit: int = 5,
                               max_content_length: Optional[int] = None,
                               include_content: bool = True, **kwargs) -> Dict[str, Any]:
        """Full web search with content extraction"""
        logger.info(f"Starting comprehensive web search for: '{query}' with parameters: {kwargs}")
    
        results = await self._multi_engine_search(query, limit, **kwargs)
    
        # Extract full content concurrently if requested
        if include_content:
            await self._extract_content_concurrent(results, max_content_length)
    
        return {
            "query": query,
            "results": [self._result_to_dict(r) for r in results],
            "total_results": len(results),
            "status": "success"
        }
  • The register_tool function that defines and registers the full_web_search tool (and others) with the FastMCP server instance.
    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
        """
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 of behavioral disclosure. It effectively describes key behavioral traits: the tool performs web searches with content extraction, mentions performance implications ('Higher limits take longer due to content extraction'), and explains what happens when include_content is false. However, it doesn't mention rate limits, authentication needs, or error conditions that would be helpful for a comprehensive web search tool.

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?

While well-structured with clear sections, the description is quite lengthy with redundant information. The initial description repeats similar phrases ('comprehensive research' appears multiple times), and the parameter documentation section is extensive. Some information could be more efficiently presented, though the structure helps with navigation.

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 complexity of a 9-parameter web search tool with no annotations, the description provides comprehensive coverage. It explains the tool's purpose, when to use it versus alternatives, detailed parameter semantics, and includes multiple usage examples. The presence of an output schema reduces the need to explain return values, and the description adequately covers the remaining context needed for effective tool use.

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?

With 0% schema description coverage for 9 parameters, the description fully compensates by providing extensive parameter documentation. Each parameter gets detailed explanations including purpose, constraints, default values, and usage examples. The description adds significant value beyond the bare schema, explaining what each parameter does and how to use it effectively.

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: 'Get comprehensive web search results with full page content extraction.' It specifies the verb ('get'), resource ('web search results'), and distinguishing feature ('full page content extraction'). It effectively differentiates from sibling tools by emphasizing comprehensive content extraction versus summaries or single-page extraction.

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 explicit guidance on when to use this tool versus alternatives. It includes a dedicated 'When to Use This' section listing specific scenarios and a 'Related Functionality' section that explicitly names sibling tools (search summaries, single page extraction) and when to use them instead. This gives clear context for tool selection.

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