Skip to main content
Glama
inesaranab

Tavily Web Search MCP Server

by inesaranab

web_search

Perform web searches to retrieve information from the internet through natural language queries using the Tavily API.

Instructions

Search the web for information about the given query

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • server.py:16-20 (handler)
    The web_search tool handler implementation. It is registered using the @mcp.tool() decorator from FastMCP, takes a query string, uses a TavilyClient instance to fetch search context, and returns the results as a string. The function signature and docstring define the implicit schema.
    @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
  • Initialization of the TavilyClient instance referenced in the web_search handler for performing web searches.
    client = TavilyClient(os.getenv("TAVILY_API_KEY"))
  • server.py:3-3 (helper)
    Import of TavilyClient library used by the web_search tool.
    from tavily import TavilyClient
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions 'Search the web' but doesn't disclose behavioral traits such as rate limits, authentication needs, result format, or potential side effects (e.g., network usage). This is a significant gap for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy to grasp quickly with zero waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (web search with 1 parameter), no annotations, and an output schema exists (which handles return values), the description is somewhat complete but lacks details on usage context, behavioral traits, and parameter semantics. It meets a minimum viable level but has clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 1 parameter with 0% description coverage, so the schema provides no semantic details. The description adds minimal meaning by implying the parameter is a query for web search, but it doesn't explain query formatting, constraints, or examples. Baseline is 3 due to low coverage, but the description only partially compensates.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Search') and resource ('the web') with the purpose ('for information about the given query'), making it easy to understand what the tool does. However, it doesn't differentiate from sibling tools like 'roll_dice' or 'text_to_speech', which are unrelated, so it doesn't need sibling differentiation but could be more specific about web search scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives or in what context. It simply states the function without mentioning any prerequisites, limitations, or scenarios where it's preferred over other tools, leaving usage entirely implicit.

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/inesaranab/MCP'

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