agentskit.js

fetchUrl

Auto-generated API reference for fetchUrl.

Function: fetchUrl()

fetchUrl(config?): ToolDefinition

Defined in: fetch-url.ts:86

Tool: fetch a URL and return its text content.

  • Enforces HTTPS/HTTP only (no file://, ftp://, etc).
  • SSRF-gated: every hop's resolved host is checked against private / loopback / link-local ranges and (when configured) an allowlist.
  • Redirects are followed manually so the target host of each hop is re-validated; the platform's automatic redirect is disabled.
  • Caps response size via maxBytes so a huge page can't flood the model's context window or blow memory.
  • Strips HTML tags by default; set raw: true to get the body verbatim.

#Parameters

#config?

FetchUrlConfig = \{\}

#Returns

ToolDefinition

Explore nearby

✎ Edit this page on GitHubΒ·Found a problem? Open an issue β†’Β·How to contribute β†’

On this page