Skip to content
BENIBIX Learn

WebFetch Tool

AI⌨️ Claude CodeBuilt-in Tools

Also known as WebFetch, WebFetch(domain:...), Fetch a URL

The tool that reads one web page and pulls out what Claude asked for.

Think of it like

It is like a friend who reads a page and tells you the part you need.

Example

Emma asks how a library's new option works. Claude fetches the library's docs page and asks it only about that option.

Why it matters

Claude can check the latest docs instead of guessing from old training.

Definition

The WebFetch tool opens one web page and turns it into plain text. It then runs a short question about the page through a second, smaller model, and Claude gets that answer, not the whole page. So the result only holds what the question asked for. It reads up to 100,000 characters per call and keeps each page for 15 minutes. It will not open localhost. A rule like WebFetch(domain:example.com) allows one site.

Example code

json
{"permissions": {"allow": ["WebFetch(domain:docs.python.org)"]}}
Let Claude read one docs site without asking.
WebFetch reads one page and pulls out the answer.

Common mistake

Trusting a no from it. If the page seems not to mention something, the question may have been too narrow. Ask again more exactly.

Key takeaways

  1. 1
    One page. Turned into text.
  2. 2
    A second model. Pulls out the answer.
  3. 3
    Allow by site. WebFetch(domain:...).

Compare

Learn it properly