ask_grok_realtime
Query Grok with real-time web and X search to answer questions needing current information; optionally restrict sources by domain or date.
Instructions
Query Grok with real-time Web Search and/or X Search via xAI's Responses API.
Args: query: Question or research prompt requiring up-to-date information. search_mode: Which live search tools to enable ("both", "web", or "x"). model: Optional xAI model ID (defaults to XAI_DEFAULT_MODEL / grok-4.3). allowed_domains: Restrict web search to at most 5 domains (mutually exclusive with excluded_domains). excluded_domains: Exclude up to 5 domains from web search. from_date: Optional X search start date in YYYY-MM-DD format (UTC). to_date: Optional X search end date in YYYY-MM-DD format (UTC, exclusive).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "ask_grok_realtime"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | ||
| query | Yes | ||
| to_date | No | ||
| from_date | No | ||
| search_mode | No | both | |
| allowed_domains | No | ||
| excluded_domains | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |