API Reference
formatWebSearchResults
function formatWebSearchResults(results): string;Defined in: tools/builtin/web.ts:113
Render web-search hits into the single text block handed to the model.
Parameters
| Parameter | Type | Description |
|---|---|---|
results | WebSearchResult[] | The hits returned by a WebBackend's search. |
Returns
string
One numbered block per hit, or "No results found." when empty.
Remarks
Each hit becomes a numbered [n] title — url line followed by its snippet; an
empty result set yields a clear note instead of an empty string.