Skip to main content
Glama
mwalker-tmd

Tavily Search MCP Server

by mwalker-tmd

web_search

Search the web to find current information and answers using natural language queries, enabling AI models to retrieve up-to-date internet data.

Instructions

Search the web for information about the given query

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes

Implementation Reference

  • server.py:12-16 (handler)
    The web_search tool handler, decorated with @mcp.tool() for registration in FastMCP. It takes a query string, uses the global TavilyClient to 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
  • server.py:12-12 (registration)
    The @mcp.tool() decorator registers the web_search function as an MCP tool.
    @mcp.tool()
  • Initialization of the TavilyClient instance used by the web_search tool for performing web searches.
    client = TavilyClient(os.getenv("TAVILY_API_KEY"))

Tool Definition Quality

Score is being calculated. Check back soon.

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/mwalker-tmd/MCP-Session-Code'

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