Skip to main content
Glama

web_search

Search the web by submitting a query. Retrieve relevant results to find answers and gather information from online sources.

Instructions

Search the web for information about the given query

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes

Implementation Reference

  • server.py:13-17 (handler)
    The web_search tool handler function. Uses @mcp.tool() decorator to register with FastMCP. Accepts a query string, calls TavilyClient.get_search_context() to perform web 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:13-17 (registration)
    Tool registration via @mcp.tool() decorator on FastMCP instance 'mcp'. The function name 'web_search' becomes the tool name exposed over the MCP protocol.
    @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
  • Input schema: the function signature 'def web_search(query: str) -> str' defines the single required string parameter 'query' and string return type, which FastMCP translates into the tool's JSON schema.
    def web_search(query: str) -> str:
Behavior2/5

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

No annotations are present, so the description carries the full burden. It does not disclose any behavioral traits such as rate limits, read-only nature, or what the search returns. The tool is assumed to be a read operation but this is unstated.

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 concise sentence with no unnecessary words. It is appropriately short for a simple tool with one parameter.

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 simplicity (single parameter, no output schema), the description provides the bare minimum. It does not explain what the tool returns (e.g., search results), which is needed for an agent to use it effectively. Lacks completeness.

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

Parameters2/5

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

Schema description coverage is 0%, but the description adds minimal value beyond the schema. It explains the query is for web search but provides no formatting guidance, length limits, or examples. The single parameter 'query' is not further detailed.

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

Purpose5/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 the resource ('the web'), making the purpose immediately obvious. It distinguishes from sibling tools (get_weather, roll_dice) which do different things.

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?

No guidance is provided on when to use this tool versus others, or any context about appropriate queries. The description lacks any 'when to use' or 'when not to use' information.

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/keertanachandar/AIE8-MCP'

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