Skip to main content

Web Fetch

web_fetch fetches web page content and returns readable text. It's more of a "page-fetching tool" rather than a "generic API client".

What it does

  • only accepts http:// or https://
  • follows redirects by default
  • extracts readable text from HTML by default
  • returns status code, headers, final URL, and content
  • blocks private network and loopback addresses by default

Parameters

Besides the required url, these commonly used parameters are supported:

ParameterDescription
methoddefaults to GET, also supports POST, PUT, PATCH, DELETE, HEAD
headersJSON object of request headers
paramsJSON object of query parameters
bodyrequest body
timeouttimeout in seconds
max_bytesmaximum returned bytes
follow_redirectswhether to follow redirects
extract_textextract text from HTML
user_agentcustom User-Agent

Config

tools:
web_fetch:
enabled: true
timeout: 20
max_bytes: 200000
follow_redirects: true
user_agent: "MushroomAgent web_fetch/1.0"
allow_private_networks: false

When to use it

  • fetch public page content
  • pull documentation, announcements, static HTML pages
  • when you don't need complex authentication or API semantics

For structured HTTP APIs, internal services, or precise API path control, use API Request.