Skip to content

Interface: XAIXSearchTool

@providerprotocol/ai


@providerprotocol/ai / xai / XAIXSearchTool

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

X (Twitter) search tool for social media content.

Enables Grok to search X posts and profiles in real-time. Pricing: $5 per 1,000 successful tool invocations.

const tool: XAIXSearchTool = {
type: 'x_search',
allowed_x_handles: ['elonmusk', 'xai'],
from_date: '2025-01-01',
};

optional allowed_x_handles: string[]

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

Limit to specific X handles (max 10, mutually exclusive with excluded_x_handles)


optional enable_image_understanding: boolean

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

Enable image analysis in posts


optional enable_video_understanding: boolean

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

Enable video analysis in posts


optional excluded_x_handles: string[]

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

Exclude specific X handles (max 10, “grok” excluded by default)


optional from_date: string

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

Start date filter (YYYY-MM-DD)


optional to_date: string

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

End date filter (YYYY-MM-DD)


type: "x_search"

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

Tool type identifier