class

Smith::Tools::WebFetch

Inherits Smith::Tools::ParallelTool < Smith::Tools::Tool < Reference < Object

Fetches a page and hands it over as readable text.

Without this, every lookup goes through bash and curl, which tips raw HTML into the context — so in practice the model works from its training cutoff, which is where library versions go wrong most often.

Constants

DEFAULT_MAX = 256 * 1024
DEFAULT_TIMEOUT = 30
MAX_REDIRECTS = 5
READABLE = ["text/", "application/json", "application/xml", "application/javascript", "application/x-yaml"] of ::String

text/* and JSON are worth reading; anything else would be noise or binary, and the context is too expensive for either.

Constructors

new(allow_private : Bool = false, max_bytes : Int32 = DEFAULT_MAX, connect_timeout : Int32 = 10, read_timeout : Int32 = DEFAULT_TIMEOUT)
Source

Instance methods

description
Source
name
Source
parameters
Source
run(args : JSON::Any) : String
Source