Skip to main content
Glama

x_search

Read-only

Search X (Twitter) content to answer queries by analyzing posts, threads, and users with filters for handles, dates, and media attachments.

Instructions

Answer a query using agentic search over X (Twitter).

Searches posts, threads, and users on X. Can filter by handle allow/deny
lists and a date range, and optionally analyze images/videos attached to posts.

Args:
    prompt: Search query or question about X content.
    model: Grok model driving the agent (default `grok-4-1-fast-reasoning`).
    allowed_x_handles: Restrict search to these handles (max 10, mutually exclusive with excluded).
    excluded_x_handles: Exclude these handles (max 10).
    from_date: Inclusive start date as `DD-MM-YYYY`.
    to_date: Inclusive end date as `DD-MM-YYYY`.
    enable_image_understanding: Let the agent analyze images in posts.
    enable_video_understanding: Let the agent analyze videos in posts (X Search only).
    include_inline_citations: Embed `[1]`-style citation markers into the answer.
    max_turns: Cap the agent's reasoning/tool turns.

Returns:
    Markdown with the answer body followed by a `**Sources:**` list of cited posts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYes
modelNogrok-4-1-fast-reasoning
allowed_x_handlesNo
excluded_x_handlesNo
from_dateNo
to_dateNo
enable_image_understandingNo
enable_video_understandingNo
include_inline_citationsNo
max_turnsNo
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations provide readOnlyHint=true, indicating a safe read operation. The description adds valuable behavioral context beyond this: it explains the agentic nature of the search, mentions the ability to analyze images/videos, describes citation formatting, and notes turn limits. This enriches the agent's understanding without contradicting annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded with a clear purpose statement, followed by organized sections for Args and Returns. While slightly verbose due to listing all parameters, each sentence adds value, and the structure aids readability without unnecessary fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (10 parameters, agentic behavior) and lack of output schema, the description is quite complete: it explains the purpose, parameters, and return format in detail. The only minor gap is the absence of explicit error handling or rate limit info, but it covers most contextual needs effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description compensates well by explaining all 10 parameters in the Args section, adding meaning like 'mutually exclusive with excluded' for handles, date format specifics, and the purpose of each boolean flag. It provides essential semantics that the schema lacks.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with specific verbs ('answer a query using agentic search') and resources ('posts, threads, and users on X'), distinguishing it from sibling tools like web_search or chat. It explicitly mentions the platform (X/Twitter) and the agentic nature of the search.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context through phrases like 'agentic search over X' and mentions filtering capabilities, but does not explicitly state when to use this tool versus alternatives like web_search or chat. No exclusions or clear alternatives are provided, leaving usage guidance implicit rather than explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/merterbak/Grok-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server