WebSearch for finding information via web search, and WebFetch for retrieving and processing the content of a specific URL.
WebSearch
Searches the web and returns results to inform Claude’s responses. Provides access to information beyond Claude’s knowledge cutoff, including current events and recent documentation. Searches are performed within a single API call. Results are returned as structured search result blocks containing titles, URLs, and content.Web search is only available in the US. Responses must include a “Sources:” section listing relevant URLs from the search results.
Inputs
The search query. Minimum 2 characters. Claude uses the current month and year automatically to ensure searches for recent information return up-to-date results.
When provided, search results are limited to these domains only. Useful for restricting results to trusted or authoritative sources.
When provided, results from these domains are excluded.
Output
The search query that was executed.
Search results and any text commentary from the model. Each result contains:
title— title of the search resulturl— URL of the search result
Time taken to complete the search.
Permission requirements
WebSearch requires permission on first use. Because it accesses the external network, it is shown in the permission dialog before executing. You can approve it for the session or allow it permanently.
Source attribution
After answering using web search results, Claude is required to include aSources: section listing the URLs used as markdown hyperlinks. This section is mandatory and must not be omitted.
Example
WebFetch
Fetches the content of a specific URL, converts HTML to markdown, and processes it using a small AI model with a user-provided prompt. Returns the model’s response based on the page content. The tool includes a 15-minute self-cleaning cache. If the same URL is fetched again within the cache window, the cached content is used to avoid redundant network requests. HTTP URLs are automatically upgraded to HTTPS.If an MCP-provided web fetch tool is available in your environment, Claude will prefer it over
WebFetch, as it may have fewer restrictions.Inputs
The URL to fetch. Must be a fully-formed valid URL (for example,
https://example.com/docs).Instructions for the model that processes the fetched content. Describe what information you want extracted or summarized from the page.
Output
The model’s response after processing the page content with the provided prompt.
Size of the fetched content in bytes.
HTTP response status code.
HTTP response status text (for example,
"OK").The URL that was fetched.
Time taken to fetch and process the content in milliseconds.
Redirects
When a URL redirects to a different host, the tool returns a message indicating the redirect URL rather than following it automatically. Claude will make a newWebFetch request with the redirect URL to continue.
Permission requirements
WebFetch asks for permission grouped by hostname. Approving a fetch from docs.example.com applies to all subsequent fetches from that same host within the session. You can also permanently allow a hostname.
Certain well-known domains (documentation sites and similar) are pre-approved and do not require a permission prompt.
GitHub URLs
For GitHub URLs, Claude prefers using thegh CLI via Bash (for example, gh pr view, gh issue view) rather than WebFetch, since the CLI provides structured data directly.