web_search
Search the web for information to answer queries, providing access to current online data through the Tavily API for educational demonstrations.
Instructions
Search the web for information about the given query
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |
Implementation Reference
- server.py:13-17 (handler)The handler function for the 'web_search' tool. It is registered via the @mcp.tool() decorator and implements the web search logic using a TavilyClient instance.@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