Package-level declarations

Types

Link copied to clipboard
class FetchWebpageTool @JvmOverloads constructor(allowPrivateNetwork: Boolean = false) : McpTool

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.

Link copied to clipboard
class WebSearchTool @JvmOverloads constructor(allowPrivateNetwork: Boolean = false) : McpTool

Searches the web by scraping DuckDuckGo's HTML endpoint (html.duckduckgo.com) with OkHttp and parsing results with Jsoup. Reaches the network (openWorldHint); requires INTERNET (always-granted). Results depend on DuckDuckGo's HTML structure (.result / .result__a / .result__snippet) — a markup change can yield zero parsed results without an error. Any HTTP or parse failure is caught and returned as a ToolResult.error; a non-2xx status returns an error too. Shares the web module's client setup (15 s connect/read, 30 s call timeout, SSRF guard on every redirect hop — see NetworkGuard).

Link copied to clipboard
object WebTools

Provider for network-reaching web tools: WebSearchTool (DuckDuckGo scrape) and FetchWebpageTool (URL fetch + text extraction).