FetchWebpageTool
Fetches a URL with OkHttp (15s connect/read timeouts, 30s overall call timeout) and extracts readable body text via Jsoup, stripping script/style/noscript/nav/footer/header before extraction. Reaches the network (openWorldHint); requires INTERNET (always-granted). Only http/https URLs are accepted; a malformed URL returns an "Invalid URL" error; non-2xx status, empty body, or any other failure returns a ToolResult.error. The response body is capped at 5 MB while reading and decoded with the Content-Type charset (see readBounded) regardless of max_length.
SSRF protection: by default the tool refuses loopback, private (RFC 1918 / fc00::/7), link-local (incl. the 169.254.169.254 metadata address), CGNAT, unspecified and multicast targets — checked at DNS resolution and again on every redirect hop (see NetworkGuard), so a public URL can't redirect into the LAN either. Pass allowPrivateNetwork = true (or use WebTools.all(context, allowPrivateNetwork = true)) to let the token holder reach the phone's local network deliberately.
Output map: title (String), url (echoed), content (text truncated to max_length), content_length (Int — full untruncated length of the extracted text), response_truncated (Boolean — the raw body exceeded the 5 MB read cap).
Parameters
when true, disables the SSRF guard (default false).