Skip to main content
Glama
sumitchatterjee13

Tavily Cursor MCP Server

tavily_search_qna

Get direct answers to specific questions using optimized web search. This tool searches the web to provide concise responses to user queries.

Instructions

Get a direct answer to a question using Tavily's Q&A optimized search. Returns a concise answer to specific questions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe question to answer
search_depthNoSearch depthbasic

Implementation Reference

  • Handler for tavily_search_qna tool: calls Tavily search API with include_answer=true and returns the answer or full JSON result.
    case "tavily_search_qna": {
      const result = await tavilyClient.search({
        query: args.query,
        search_depth: args.search_depth || "basic",
        include_answer: true,
      });
    
      return {
        content: [
          {
            type: "text",
            text: result.answer || JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Input schema and metadata for the tavily_search_qna tool, registered in listTools response.
    {
      name: "tavily_search_qna",
      description:
        "Get a direct answer to a question using Tavily's Q&A optimized search. Returns a concise answer to specific questions.",
      inputSchema: {
        type: "object",
        properties: {
          query: {
            type: "string",
            description: "The question to answer",
          },
          search_depth: {
            type: "string",
            enum: ["basic", "advanced"],
            description: "Search depth",
            default: "basic",
          },
        },
        required: ["query"],
      },
    },
  • TavilyClient.search method: performs the actual API call to Tavily search endpoint, used by tavily_search_qna with include_answer flag.
    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 mentions 'Returns a concise answer,' which gives some output behavior, but lacks details on rate limits, authentication needs, error handling, or what 'concise' entails (e.g., length, format). For a search tool with no annotation coverage, this leaves significant gaps in understanding operational traits.

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 front-loaded and efficient: two sentences that directly state the tool's function and output without unnecessary details. Every sentence earns its place by covering purpose and behavior concisely, making it easy to parse and understand quickly.

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 (search with parameters), no annotations, and no output schema, the description provides basic purpose and output info but lacks depth. It doesn't cover error cases, response format beyond 'concise answer,' or integration with sibling tools. This is adequate as a minimum viable description but has clear gaps for effective 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?

Schema description coverage is 100%, with clear descriptions for both parameters ('query' as 'The question to answer' and 'search_depth' as 'Search depth' with enum values). The description adds no additional parameter semantics beyond what the schema provides, such as explaining 'search_depth' choices or query formatting. Baseline 3 is appropriate since the schema does the heavy lifting.

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: 'Get a direct answer to a question using Tavily's Q&A optimized search.' It specifies the action ('Get a direct answer') and resource ('question'), but doesn't explicitly differentiate from sibling tools like 'tavily_search' or 'tavily_search_context' beyond mentioning 'Q&A optimized search.' This makes it clear but not fully sibling-distinctive.

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

Usage Guidelines3/5

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

The description implies usage context with 'to specific questions' and mentions 'Q&A optimized search,' suggesting it's for direct answers rather than broader searches. However, it doesn't provide explicit guidance on when to use this tool versus alternatives like 'tavily_search' or 'tavily_extract,' nor does it specify exclusions or prerequisites. The guidance is present but limited to implication.

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