Skip to main content
Glama

search_x_posts

Find and analyze real-time public X posts, threads, and sentiment by keyword, handle, and date via Grok to investigate current discussions.

Instructions

Search real-time public posts, threads, and sentiment on X (Twitter) via Grok.

Args: query: Topic, keywords, or question to investigate on X. model: Optional xAI model ID (defaults to XAI_DEFAULT_MODEL / grok-4.3). allowed_x_handles: Only search posts from these X handles (max 20, with or without '@'). excluded_x_handles: Ignore posts from these X handles (max 20, mutually exclusive with allowed_x_handles). from_date: Start date in YYYY-MM-DD format (00:00 UTC). to_date: End date in YYYY-MM-DD format (exclusive, 00:00 UTC). enable_image_understanding: Allow Grok to inspect images attached to X posts. enable_video_understanding: Allow Grok to inspect videos attached to X posts.

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": "search_x_posts"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNo
queryYes
to_dateNo
from_dateNo
allowed_x_handlesNo
excluded_x_handlesNo
enable_image_understandingNo
enable_video_understandingNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses that only public posts are searched, that the model defaults to XAI_DEFAULT_MODEL / grok-4.3, that handle filters cap at 20 and are mutually exclusive, and that dates are UTC with an exclusive end. It does not mention rate limits, auth requirements, or pagination behavior, which is the only material gap.

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?

A single front-loaded purpose sentence followed by an Args list where every line adds information the schema titles do not carry. Slightly verbose in the argument block, but nothing is wasted.

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?

For an 8-parameter tool with no annotations and an existing output schema, the description covers purpose, all parameter semantics, and key constraints, so an agent can call it correctly without opening the schema. Only operational details (rate limits, failure modes) are absent, and return values are rightly left to the output schema.

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

Parameters5/5

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

Schema description coverage is 0%, so the Args block does all the work and does it thoroughly: it explains the model default, the max-20 handle limit and '@' optionality, the mutual exclusivity rule, the YYYY-MM-DD / 00:00 UTC / exclusive-end date semantics, and what the image/video understanding flags actually enable.

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

Purpose4/5

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

States a specific verb and resource ('Search real-time public posts, threads, and sentiment on X (Twitter)') plus the mechanism ('via Grok'), which clearly separates it from a generic Grok Q&A sibling. It stops short of naming an alternative sibling explicitly, so it lands just below the top band.

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?

Usage is implied by 'Topic, keywords, or question to investigate on X' and by the per-parameter constraints (mutual exclusivity of allowed/excluded handles), but there is no explicit statement of when to choose this over ask_grok_realtime or grok_code_reasoning, and no when-not guidance.

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