Documentation
¶
Overview ¶
Package webfetchtool implements the WebFetch tool — fetches a URL and returns its content as Markdown text.
Mirrors src/tools/WebFetchTool/WebFetchTool.ts + utils.ts.
M4 scope: HTTP GET with 30s timeout, HTML→Markdown via golang.org/x/net/html parser, 200KB content cap, User-Agent spoofing. The real tool also calls a secondary Haiku model to apply the caller's prompt against the fetched content; we do that inline with simple extraction for M4. Domain allowlist / permission checks land in M5.
Index ¶
Constants ¶
View Source
const HTTPTimeout = 30 * time.Second
HTTPTimeout is the total request timeout.
View Source
const MaxContentBytes = 200 * 1024 // 200 KB
MaxContentBytes caps the response body size.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tool ¶
type Tool struct {
// contains filtered or unexported fields
}
Tool implements the WebFetch tool.
func (*Tool) Description ¶
func (*Tool) InputSchema ¶
func (*Tool) InputSchema() json.RawMessage
func (*Tool) IsConcurrencySafe ¶
func (*Tool) IsConcurrencySafe(json.RawMessage) bool
func (*Tool) IsReadOnly ¶
func (*Tool) IsReadOnly(json.RawMessage) bool
Click to show internal directories.
Click to hide internal directories.