Skip to main content
X Search lets a Grok-powered agent search posts and content on X, formerly Twitter, while it responds.

What it does

This tool uses xAI’s native x_search capability. It can help an agent find recent posts, discussions, and threads on X without connecting a separate MCP server.

Requirements

X Search is only available when your agent is configured to use an xAI (Grok) model. When your agent uses a different model provider, use GPT Search, Google Search, or xAI Web Search where appropriate.

Adding the tool to an agent

  1. Open an agent in the editor.
  2. Make sure the agent’s model is set to an xAI Grok model.
  3. Click the button with the tooltip Add MCP Tool or Sub Agent.
  4. In MCP Tools, click X Search.

Configuration

X Search settings are configured in the MCP tool settings sheet: Notes:
  • Allowed X Handles and Excluded X Handles are mutually exclusive.
  • Dates must be valid ISO date strings (YYYY-MM-DD).

Use cases

  • Monitor what people are saying about a company, product, topic, or event on X.
  • Find recent posts and threads before answering a time-sensitive question.
  • Gather social context and public reactions from X content.

Billing

X Search is billed at $0.005 per completed request/tool call.

Notes

  • X Search searches X/Twitter posts and content. For public web results from Grok, use xAI Web Search.
  • This tool is powered by xAI’s native x_search capability, not an external MCP server.
  • Use Chat in the editor to see when the agent calls X Search during a test run. See Testing with Chat.