Interface: XAIXSearchTool
@providerprotocol/ai / xai / XAIXSearchTool
Interface: XAIXSearchTool
Section titled “Interface: 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.
Example
Section titled “Example”const tool: XAIXSearchTool = { type: 'x_search', allowed_x_handles: ['elonmusk', 'xai'], from_date: '2025-01-01',};Properties
Section titled “Properties”allowed_x_handles?
Section titled “allowed_x_handles?”
optionalallowed_x_handles:string[]
Defined in: src/providers/xai/types.ts:314
Limit to specific X handles (max 10, mutually exclusive with excluded_x_handles)
enable_image_understanding?
Section titled “enable_image_understanding?”
optionalenable_image_understanding:boolean
Defined in: src/providers/xai/types.ts:322
Enable image analysis in posts
enable_video_understanding?
Section titled “enable_video_understanding?”
optionalenable_video_understanding:boolean
Defined in: src/providers/xai/types.ts:324
Enable video analysis in posts
excluded_x_handles?
Section titled “excluded_x_handles?”
optionalexcluded_x_handles:string[]
Defined in: src/providers/xai/types.ts:316
Exclude specific X handles (max 10, “grok” excluded by default)
from_date?
Section titled “from_date?”
optionalfrom_date:string
Defined in: src/providers/xai/types.ts:318
Start date filter (YYYY-MM-DD)
to_date?
Section titled “to_date?”
optionalto_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