Skip to main content
ChatCLI includes two native web tools — @webfetch and @websearch — that allow the agent to search for information on the internet and fetch web pages without depending on external MCP servers.
Web tools are native ChatCLI tools, automatically available in agent and coder modes. No MCP server configuration is required to use them.

@webfetch

Fetches a URL, strips the HTML, and returns the clean text content. Ideal for reading documentation, articles, READMEs, and any web page.

How It Works

1

HTTP request

ChatCLI makes a GET request to the provided URL with standard browser headers.
2

HTML parsing

The received HTML is parsed using golang.org/x/net/html, extracting only the text content.
3

Cleanup

Script, style, navigation tags and non-text elements are removed. The resulting text is cleaned and formatted.
4

Return

The text content is returned to the agent as the tool call result.

Usage

The LLM invokes @webfetch automatically when it needs to access content from a URL. You can also request it explicitly:
Read the documentation at https://pkg.go.dev/net/http and explain the Client type to me

Argument Formats

{
  "tool": "webfetch",
  "args": {
    "url": "https://pkg.go.dev/net/http"
  }
}

Example

User: Fetch the content from https://go.dev/blog/error-handling-and-go

Agent: I'll fetch the page content.

[tool_call: webfetch {"url": "https://go.dev/blog/error-handling-and-go"}]

Result: The article "Error handling and Go" explains Go's error
handling patterns, including...
@webfetch respects redirects (up to 10), timeouts (30s), and returns clear errors for inaccessible URLs or SSL issues.

@websearch

Performs a web search via DuckDuckGo and returns results with title, URL, and snippet for each result.

How It Works

1

Query

The agent sends the search query to the DuckDuckGo API.
2

Result parsing

Results are parsed and formatted with title, URL, and descriptive snippet.
3

Structured return

Results are returned as formatted text for the agent to process.

Usage

The LLM invokes @websearch when it needs to search for up-to-date information on the web:
Search for best practices for rate limiting in Go in 2026

Argument Formats

{
  "tool": "websearch",
  "args": {
    "query": "golang rate limiting best practices 2026"
  }
}

Example

User: Search how to set up OpenTelemetry with Go

Agent: I'll search for up-to-date information on that.

[tool_call: websearch {"query": "opentelemetry go setup tutorial"}]

Results:
1. Getting Started with OpenTelemetry in Go
   https://opentelemetry.io/docs/languages/go/getting-started/
   Official guide to instrumenting Go applications with OpenTelemetry...

2. OpenTelemetry Go SDK - Complete Guide
   https://example.com/otel-go-guide
   Step-by-step tutorial covering traces, metrics and logs...

3. Distributed Tracing in Go with OpenTelemetry
   https://example.com/distributed-tracing-go
   Learn how to implement distributed tracing across microservices...

Comparison

Aspect@webfetch@websearch
PurposeRead content from a specific URLSearch the web for a query
InputURLSearch query
OutputClean text from the pageList of results (title + URL + snippet)
When to useYou know the exact URLYou need to find information
EngineHTTP GET + HTML parserDuckDuckGo API

Availability

Web tools are available in the following modes:
Mode@webfetch@websearch
ChatNoNo
Agent (/agent)YesYes
Coder (/coder)YesYes
One-shot (-p)Yes (with --agent)Yes (with --agent)
In interactive chat mode, web tools are not available. You need to be in agent or coder mode for the LLM to invoke them as tool calls.

Next Steps

MCP Integration

Integrate additional web tools via MCP servers.

Agentic Plugins

See all tools available to the agent.