Skip to main content
Glama
sumitchatterjee13

Tavily Cursor MCP Server

tavily_search

Search the web to retrieve relevant information with URLs, content snippets, and metadata for research, content creation, or question answering.

Instructions

Search the web using Tavily API. Returns relevant search results with URLs, content snippets, and metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe search query
search_depthNoSearch depth - 'basic' for faster results, 'advanced' for more thorough searchbasic
topicNoSearch topic typegeneral
daysNoNumber of days back to search (for news topic)
max_resultsNoMaximum number of results to return
include_imagesNoInclude images in results
include_answerNoInclude AI-generated answer
include_raw_contentNoInclude raw HTML content

Implementation Reference

  • Handler for the 'tavily_search' tool. Invokes TavilyClient.search with parsed arguments and returns the result as formatted text content.
    case "tavily_search": {
      const result = await tavilyClient.search({
        query: args.query,
        search_depth: args.search_depth || "basic",
        topic: args.topic || "general",
        days: args.days || 3,
        max_results: args.max_results || 5,
        include_images: args.include_images || false,
        include_answer: args.include_answer || false,
        include_raw_content: args.include_raw_content || false,
      });
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • index.js:81-134 (registration)
    Registration of the 'tavily_search' tool in the listTools handler, including name, description, and input schema definition.
    {
      name: "tavily_search",
      description:
        "Search the web using Tavily API. Returns relevant search results with URLs, content snippets, and metadata.",
      inputSchema: {
        type: "object",
        properties: {
          query: {
            type: "string",
            description: "The search query",
          },
          search_depth: {
            type: "string",
            enum: ["basic", "advanced"],
            description: "Search depth - 'basic' for faster results, 'advanced' for more thorough search",
            default: "basic",
          },
          topic: {
            type: "string",
            enum: ["general", "news"],
            description: "Search topic type",
            default: "general",
          },
          days: {
            type: "number",
            description: "Number of days back to search (for news topic)",
            default: 3,
          },
          max_results: {
            type: "number",
            description: "Maximum number of results to return",
            default: 5,
            minimum: 1,
            maximum: 20,
          },
          include_images: {
            type: "boolean",
            description: "Include images in results",
            default: false,
          },
          include_answer: {
            type: "boolean",
            description: "Include AI-generated answer",
            default: false,
          },
          include_raw_content: {
            type: "boolean",
            description: "Include raw HTML content",
            default: false,
          },
        },
        required: ["query"],
      },
    },
  • Helper method in TavilyClient class that performs the HTTP POST request to the Tavily search API endpoint.
    async search(params) {
      const response = await fetch(`${this.baseUrl}/search`, {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
        },
        body: JSON.stringify({
          api_key: this.apiKey,
          ...params,
        }),
      });
    
      if (!response.ok) {
        throw new Error(`Tavily API error: ${response.statusText}`);
      }
    
      return await response.json();
    }
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 of behavioral disclosure. It states the tool 'Returns relevant search results with URLs, content snippets, and metadata', which gives some output context, but lacks critical behavioral details such as rate limits, authentication requirements, error handling, or whether it's a read-only operation. For a web search tool with no annotation coverage, this is a significant gap in transparency.

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 extremely concise and well-structured in a single sentence: 'Search the web using Tavily API. Returns relevant search results with URLs, content snippets, and metadata.' It front-loads the core purpose and efficiently communicates the key functionality without any wasted words or redundancy.

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 complexity of a web search tool with 8 parameters and no output schema, the description is minimally adequate. It covers the basic purpose and return format but lacks details on behavioral aspects (e.g., rate limits, errors) and doesn't help differentiate from sibling tools. With no annotations and no output schema, the description should provide more context to be fully complete for agent use.

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 100% description coverage, providing clear documentation for all 8 parameters. The description adds no additional parameter semantics beyond what's in the schema (e.g., it doesn't explain parameter interactions or provide usage examples). With high schema coverage, the baseline score of 3 is appropriate as the schema does the heavy lifting, and the description doesn't compensate with extra insights.

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 tool's purpose: 'Search the web using Tavily API' with the specific verb 'Search' and resource 'web'. It distinguishes itself from siblings by mentioning it returns 'relevant search results with URLs, content snippets, and metadata', which suggests a general search function. However, it doesn't explicitly differentiate from sibling tools like 'tavily_search_context' or 'tavily_search_qna', which likely have overlapping purposes.

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 its siblings (tavily_extract, tavily_search_context, tavily_search_qna). It mentions what the tool does but offers no context about alternatives, exclusions, or specific use cases. This leaves the agent without clear direction on tool selection among similar options.

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/sumitchatterjee13/tavily-cursor-mcp'

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