API Reference
formatWebFetchResult
function formatWebFetchResult(result): string;Defined in: tools/builtin/web.ts:133
Render a fetched page into the single text block handed to the model.
Parameters
| Parameter | Type | Description |
|---|---|---|
result | WebFetchResult | The contents captured by a WebBackend's fetch. |
Returns
string
A header followed by the body, with (no content) standing in for an empty body.
Remarks
A short header (final URL, status, content type) precedes the extracted body, so the model can see redirects and non-200 responses rather than guessing from the text alone.