tool-grok-search
grok_search (xAI Grok Live Search)
When to use
- Real-time/current-event lookup where you need fresh sources (X + web + news) and citations.
- Social sentiment / “what are people saying on X” for a market or entity.
Don’t use
- When free sources suffice (try
gdelt_newsfirst for background headlines). - When you don’t need citations and want zero cost.
Cost + keys
- Paid. Cost scales mainly with
maxResults(~$0.025/sourcepersrc/agents/grok.ts). - Requires
XAI_API_KEYorGROK_API_KEYin env.
Parameters
query(string, required): Be specific. Include the entity + timeframe + what you want extracted.sources(array of"web" | "x" | "news", optional): Restrict which channels are searched.maxResults(int, optional, 1–50): Higher = more sources/cost; default is 20.
Examples
Tool call (agent / MCP style):
{ "name": "grok_search", "params": { "query": "Polymarket Venezuela election market latest developments", "sources": ["news","web"], "maxResults": 12 } }
HTTP:
curl -sS -X POST http://127.0.0.1:7777/api/tools/execute \
-H 'Content-Type: application/json' \
-d '{"name":"grok_search","params":{"query":"what changed in CPI print today","sources":["news"],"maxResults":10}}'
Output
- Returns:
{ content: string, citations: string[], sourcesUsed: number, model: string } - Rendered:
Answer(text)Citations(table)Meta(text: model + sourcesUsed)
Notes / extensions
- The underlying Grok client supports richer filters (date range, domain allow/deny, X handle allow/deny, engagement thresholds), but the current
grok_searchtool only exposesquery/sources/maxResults. If you need those filters, extendsrc/tools/grok-search.tsto pass them through.
More from captaindpt/truth-terminal
tool-polymarket-book
Use the polymarket_book tool to fetch Polymarket CLOB order book depth (YES/NO) via Gamma + CLOB and expose best bid/ask/mid.
29tool-nasdaq-candles
Use the nasdaq_candles tool to fetch OHLCV candles (free) with caching and latency metadata; good for quick charting.
24tool-nasdaq-quote
Use the nasdaq_quote tool to fetch a US equity quote (free; delayed) with lightweight caching and latency metadata.
22tool-polymarket-trades
Use the polymarket_trades tool to fetch and filter recent Polymarket trades (free Data API), optionally by market or wallet.
16tool-gdelt-news
Use the gdelt_news tool to fetch recent headlines via GDELT (free) with shared caching, rate limiting, and basic query normalization.
15tool-coingecko-price
Use the coingecko_price tool to fetch spot crypto prices (free) for one or more symbols/ids with 24h change and last-updated timestamps.
12