Skip to main content
Glama

Search Twitter Posts

search_twitter
Read-only

Search Twitter/X posts by keyword; X search operators work in query. Returns tweet text, author username, URL, date, engagement metrics (likes, retweets, replies, views) and X's "Made with AI" label (ai_label). Filter by time window (posted_ago) or date range. Use twitter_user_tweets for one account's timeline. Billed $0.006 per page.

Input Schema

NameRequiredDescriptionDefault
pagesNoNumber of pages to fetch, 1-20 (default: 1)
queryYesSearch keyword (max 500 characters). Supports X search operators
sort_byNoSort order: "most_recent" or "relevance"most_recent
end_dateNoOnly posts up to and including this date (YYYY-MM-DD, UTC). Not with posted_ago
posted_agoNoOnly posts from this period: "1h", "24h", "7d", "30d", or "12m" (default: all time). Works with both sort orders
start_dateNoOnly posts from this date onward (YYYY-MM-DD, UTC). Not with posted_ago
get_sentimentNoAdd AI sentiment analysis (Plutchik emotions, dominant_emotion, intensity, and positive/negative/neutral polarity) to each result. Adds a small surcharge per page, or per request on single-request endpoints.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / end_date
      Added value: +{
      +  "description": "Only posts up to and including this date (YYYY-MM-DD, UTC). Not with posted_ago",
      +  "type": "string"
      +}
    • addedInput schema / properties / posted_ago
      Added value: +{
      +  "description": "Only posts from this period: \"1h\", \"24h\", \"7d\", \"30d\", or \"12m\" (default: all time). Works with both sort orders",
      +  "enum": [
      +    "1h",
      +    "24h",
      +    "7d",
      +    "30d",
      +    "12m"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / query / description
      Previous value: -"Search keyword (max 500 characters)"New value: +"Search keyword (max 500 characters). Supports X search operators"
    • addedInput schema / properties / start_date
      Added value: +{
      +  "description": "Only posts from this date onward (YYYY-MM-DD, UTC). Not with posted_ago",
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / get_sentiment / description
      Previous value: -"Add AI sentiment analysis (Plutchik emotions, dominant_emotion, intensity, and positive/negative/neutral polarity) to each result. Adds a small per-page surcharge."New value: +"Add AI sentiment analysis (Plutchik emotions, dominant_emotion, intensity, and positive/negative/neutral polarity) to each result. Adds a small surcharge per page, or per request on single-request endpoints."
  3. Changed1 schema field changed
    • changedInput schema / properties / pages / description
      Previous value: -"Number of pages to fetch, 1-10 (default: 1)"New value: +"Number of pages to fetch, 1-20 (default: 1)"
  4. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare this a read-only, open-world, non-destructive call, and the description adds genuinely new context: the exact fields returned, the presence of X's ai_label, and per-page billing at $0.006 (plus a sentiment surcharge). It omits pagination/deduplication behavior and any rate-limit notes, keeping it off a 5.

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

Conciseness5/5

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

Roughly four tight sentences, front-loaded with what the tool does, then return contents, then filtering, then the alternative and cost. Each clause carries distinct information with no restatement of the tool name or filler.

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?

There is no output schema, so enumerating return fields (text, author, URL, date, engagement, ai_label) is necessary and present, as is pricing. Minor gaps remain around result volume per page and how pages compose, but for a 7-param, 1-required search tool this is close to sufficient.

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

Parameters3/5

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

Schema coverage is 100% and the descriptions already document query length, sort order, date formats, and the posted_ago/end_date exclusivity. The description restates filters and the operator support without adding syntax, format, or interaction details beyond the schema, so it sits at the baseline.

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?

States a specific verb and resource ("Search Twitter/X posts by keyword") plus the scope-defining fact that X search operators are honored in the query. It explicitly names the sibling it is not (twitter_user_tweets), so an agent can pick between them without opening either schema.

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

Usage Guidelines4/5

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

Gives the key routing rule ("Use twitter_user_tweets for one account's timeline") and explains the two time-filtering modes. It stops short of mentioning other near neighbors such as search_twitter_users or twitter_trends, so it is clear but not exhaustively disambiguating.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources