LegacyWebSearchServerTool - Go SDK

LegacyWebSearchServerTool type definition

The Go SDK and docs are currently in beta. Report issues on GitHub.

Web search tool configuration

Fields

FieldTypeRequiredDescriptionExample
Engine*components.WebSearchEngineEnumWhich search engine to use. “auto” (default) uses native if the provider supports it, otherwise Exa. “native” forces the provider’s built-in search. “exa” forces the Exa search API. “firecrawl” uses Firecrawl (requires BYOK). “parallel” uses the Parallel search API.auto
Filtersoptionalnullable.OptionalNullable[components.WebSearchDomainFilter]N/A{"allowed_domains": ["example.com"],"excluded_domains": ["spam.com"]}
MaxResults*int64Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search.5
SearchContextSize*components.SearchContextSizeEnumSize of the search context for web search toolsmedium
Typecomponents.LegacyWebSearchServerToolType✔️N/A
UserLocationoptionalnullable.OptionalNullable[components.WebSearchUserLocation]User location information for web search{"city": "San Francisco","country": "USA","region": "California","timezone": "America/Los_Angeles","type": "approximate"}