search
Perform web searches to retrieve current information from the internet. Enter a query to find relevant results for any topic.
Instructions
Performs web searches and retrieves up-to-date information from the internet. Args: - prompt: Specific query or topic to search for on the internet - limit: Maximum number of results to return (between 1 and 20)
Returns:
- Search results with relevant information about the requested topic
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |
Implementation Reference
- main.py:22-36 (handler)MCP tool handler for 'search': decorated with @mcp.tool(), delegates to WebTools.search(query), includes docstring schema.@mcp.tool() async def search(query: str) -> str: """Performs web searches and retrieves up-to-date information from the internet. Args: - prompt: Specific query or topic to search for on the internet - limit: Maximum number of results to return (between 1 and 20) Returns: - Search results with relevant information about the requested topic """ try: search = webtools.search(query) return search except Exception as e: return f"Error performing search: {str(e)}"
- tools/webtools.py:16-21 (helper)Core search logic in WebTools class using FirecrawlApp.search.def search(self, query: str): try: response = self.firecrawl.search(query) return response except Exception as e: return f"Error performing search: {str(e)}"
- main.py:22-22 (registration)Registration decorator for the 'search' tool via FastMCP.@mcp.tool()
- main.py:24-31 (schema)Docstring defining input schema (query/prompt, limit) and output for the 'search' tool."""Performs web searches and retrieves up-to-date information from the internet. Args: - prompt: Specific query or topic to search for on the internet - limit: Maximum number of results to return (between 1 and 20) Returns: - Search results with relevant information about the requested topic """