WebFetchTools
Namespace: Vercel.AI.WebFetch
public static class WebFetchToolsA provider-independent web fetch tool. Maps to @ai-sdk/tool-web-fetch.
Inheritance: object
Fields
Section titled “Fields”ToolName
Section titled “ToolName”public const string ToolName = "webFetch"Name of the tool the model sees.
Value: string
Methods
Section titled “Methods”Create(WebFetchToolOptions?)
Section titled “Create(WebFetchToolOptions?)”public static Tool Create(WebFetchToolOptions? options = null)Creates a provider-independent web fetch tool. The model calls the tool with a URL. HTML pages are converted to markdown with the main content extracted, and text formats are returned as is. JavaScript is not executed. Failures are returned as results so the model can recover. Requests are GET only, without cookies or credentials. Every hop, including redirects, is checked against the domain filter and private addresses are blocked.
Parameters
| Name | Type | Description |
|---|---|---|
options |
WebFetchToolOptions |
Returns: Tool
Exceptions
| Type | Condition |
|---|---|
| InvalidArgumentError | An option is invalid. |
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product