# `Mojentic.LLM.Tools.WebSearchTool`
[🔗](https://github.com/svetzal/mojentic-ex/blob/v1.5.0/lib/mojentic/llm/tools/web_search_tool.ex#L1)

Tool for searching the web using DuckDuckGo.

This tool searches DuckDuckGo's lite endpoint and returns organic search results.
It does not require an API key, making it a free alternative to paid search APIs.

## Examples

    alias Mojentic.LLM.Tools.WebSearchTool

    tool = WebSearchTool.new()
    {:ok, results} = WebSearchTool.run(tool, %{"query" => "Elixir programming"})
    # => {:ok, [%{title: "...", url: "...", snippet: "..."}]}

## Configuration

You can optionally configure the HTTP client for testing:

    tool = WebSearchTool.new(http_client: MyHTTPClient)

# `new`

Creates a new WebSearchTool instance.

## Options

- `:http_client` - Optional HTTP client module for testing (defaults to configured client)

---

*Consult [api-reference.md](api-reference.md) for complete listing*
