WebFetch, WebSearch (Claude Code)
Tool : A precise action the AI can call · requires claude-code
Web search and page retrieval from the code agent.
Allow by domain; web content is untrusted input.
Security reflects where data goes, requested permissions and incidents on record at the verification date. It is not a guarantee of zero risk: check the deployment mode and the connections you enable.
What it does, concretely
When a code agent needs to consult online documentation, check an API, or look up recent information, it cannot do so without a dedicated tool. WebFetch and WebSearch fill this gap by giving Claude Code the ability to retrieve web pages and perform web searches directly from the working session.
WebFetch retrieves the content of a specific URL and makes it available to the agent. WebSearch performs web searches and returns results. Both tools require explicit permission before they can be used: they are marked as requiring a permission in the official reference table. WebFetch can be controlled on a per-domain basis using the permission rule WebFetch(domain:example.com), while WebSearch is allowed or denied as a whole.
These tools are aimed at developers who use Claude Code to automate tasks involving external sources: reading documentation, checking dependencies, retrieving public data. They are particularly useful in workflows where the agent needs to cross-reference local and remote information.
These tools are not suitable for contexts where all network communication must be avoided, for example in isolated environments or those subject to strict security constraints. Content retrieved from the web is not filtered and may contain unreliable information.
What it offers
- ·WebFetch retrieves the content of a specific URL and passes it to the agent for analysis or use in the current task.
- ·WebSearch performs web searches and returns results that the agent can use.
- ·WebFetch accepts per-domain permission rules, in the format WebFetch(domain:example.com), to restrict network access.
- ·WebSearch can be allowed or denied globally via permission rules, with no domain-level filtering available.
- ·Both tools are configurable in permission settings, the CLI flags --allowedTools and --disallowedTools, and in Agent SDK options.
- ·Permission rules also apply in hooks and subagent tool lists, offering granular control depending on the execution context.
In practice
- Price
- Free
- Commercial use
- Commercial use: yes
- Available on
- claude-code
- Host
- claude-code
- FR interface
- No
Security and data
- Rating
- Security: one caveat, see the card
- Capabilities
- readswritesexecutesnetwork
- Your data
- Data with the vendor
- Maintenance
- Active
Links and repository checked on 25 October 2026 · added on 1 February 2025
How to install WebFetch, WebSearch (Claude Code)
permissions.allow: ["WebFetch(domain:docs.python.org)"]