Skip to content

Interface: XAIWebSearchTool

@providerprotocol/ai


@providerprotocol/ai / xai / XAIWebSearchTool

Defined in: src/providers/xai/types.ts:284

Web search tool for real-time web information retrieval.

Enables Grok to search the web for up-to-date information. Pricing: $5 per 1,000 successful tool invocations.

const tool: XAIWebSearchTool = {
type: 'web_search',
allowed_domains: ['wikipedia.org', 'github.com'],
};

optional allowed_domains: string[]

Defined in: src/providers/xai/types.ts:288

Restrict to specific domains (max 5, mutually exclusive with excluded_domains)


optional enable_image_understanding: boolean

Defined in: src/providers/xai/types.ts:292

Enable image analysis from search results


optional excluded_domains: string[]

Defined in: src/providers/xai/types.ts:290

Exclude specific domains (max 5, mutually exclusive with allowed_domains)


type: "web_search"

Defined in: src/providers/xai/types.ts:286

Tool type identifier