web_search
Search the web for information using natural language queries to find answers and data from the internet.
Instructions
Search the web for information about the given query
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |
Implementation Reference
- server.py:12-16 (handler)The handler function for the 'web_search' tool, decorated with @mcp.tool() for registration. It takes a query string, uses the global TavilyClient to perform the search, and returns the search results.@mcp.tool() def web_search(query: str) -> str: """Search the web for information about the given query""" search_results = client.get_search_context(query=query) return search_results