Skip to main content
Glama

Twitter/X Search

twitter
Read-onlyIdempotent

PURPOSE: Direct Twitter/X access — raw operations on a specific account, tweet, search, list, or community.

COVERS (by action): tweet search & user search; a named user's profile / tweets / timeline / mentions; followers, followings & follow checks; a tweet's replies / thread / quotes / retweeters; trends; community & list timelines; spaces; long-form articles.

BOUNDARIES:

  • Use twitter for RAW ops on a NAMED account or a specific tweet. For "what are KOLs calling / 喊单" use signal(kol_call); for general crypto/news tweet CONTENT use news(sources=["twitter"]).

USAGE — pick an action and supply its required params:

  • search: query (+ optional query_type, cursor, time_range)

  • user_info / user_about: user_name

  • batch_user_info: user_ids (comma-separated)

  • search_users: query

  • user_tweets: user_name or user_id (+ optional include_replies, cursor)

  • user_timeline: user_id (+ optional cursor)

  • user_mentions: user_name (+ optional cursor)

  • followers / followings: user_name (+ optional cursor)

  • verified_followers: user_id (+ optional cursor)

  • check_follow: user_name + target_user_name

  • tweets_by_ids: tweet_ids (comma-separated)

  • tweet_replies / tweet_replies_v2 / tweet_thread / tweet_quotes / tweet_retweeters: tweet_id (+ optional cursor)

  • trends: woeid (default 1 = worldwide)

  • community_tweets: community_id (+ optional cursor)

  • article: tweet_id

  • space_detail: space_id

  • list_tweets / list_timeline: list_id (+ optional cursor)

RETURNS: the raw twitterapi.io payload for the chosen action (tweets / users / relationships / trends), paginated via next_cursor.

EXAMPLES:

  • "搜 BTC 相关推文" → action="search", query="BTC"

  • "Elon Musk 账号信息" → action="user_info", user_name="elonmusk"

  • "V神最近发了什么" → action="user_tweets", user_name="VitalikButerin"

  • "这条推文的回复" → action="tweet_replies", tweet_id="..."

  • "全球趋势" → action="trends"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoLocal records per business list (default 20 and max 20). Does not change upstream page size. Omitted records from a shortened page are not recoverable through the next upstream cursor.
queryNoSearch query string. Required for: search\, search_users. Supports Twitter advanced search operators. Up to 500 runes; longer queries silently truncated.
woeidNoYahoo WOEID for trends location (1=Worldwide\, 23424977=US). Default 1.
actionYesWhich Twitter operation to perform: search | user_info | user_about | batch_user_info | search_users | user_tweets | user_timeline | user_mentions | followers | followings | verified_followers | check_follow | tweets_by_ids | tweet_replies | tweet_replies_v2 | tweet_thread | tweet_quotes | tweet_retweeters | trends | community_tweets | article | space_detail | list_tweets | list_timeline
cursorNoPagination cursor from previous response's next_cursor field.
list_idNoTwitter List ID. Required for: list_tweets\, list_timeline.
user_idNoNumeric Twitter user ID. Required for: user_timeline\, verified_followers. Also accepted by user_tweets as alternative to user_name.
space_idNoTwitter Space ID. Required for: space_detail.
tweet_idNoSingle tweet ID. Required for: tweet_replies\, tweet_replies_v2\, tweet_thread\, tweet_quotes\, tweet_retweeters\, article.
user_idsNoComma-separated numeric user IDs. Required for: batch_user_info.
tweet_idsNoComma-separated tweet IDs. Required for: tweets_by_ids.
user_nameNoTwitter handle (without @). Required for: user_info\, user_about\, user_tweets\, user_mentions\, followers\, followings\, check_follow.
verbosityNoPer logical prose field: concise 200 Unicode characters | standard 600 (default) | detail 2000. Includes nested text; detail remains capped. Independent of record limit.
query_typeNoSearch result ordering: Latest (default) | Top. Only for: search.
time_rangeNoExplicit caller-requested recency window\, written as <number><unit> where unit is h|d|w|m|y — e.g. 1h\, 4h\, 1d\, 1w\, 1m\, 6m\, 1y. Supply this field when a time constraint is required; the server does not infer a window from query text. Only for: search.
community_idNoTwitter Community ID. Required for: community_tweets.
include_repliesNoInclude reply tweets in results. For: user_tweets.
target_user_nameNoSecond user handle for relationship check. Required for: check_follow.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint, and idempotentHint. The description adds useful behavioral context beyond that: results are the raw twitterapi.io payload and are paginated via next_cursor. It does not cover rate limits or authentication requirements, but with strong annotation coverage this is a solid addition rather than a 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?

The description is long but well structured with PURPOSE, COVERS, BOUNDARIES, USAGE, RETURNS, and EXAMPLES sections. For a tool with 24 possible actions and 18 parameters, that length is largely justified. There is minor redundancy between COVERS and USAGE, preventing a perfect score.

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

Completeness5/5

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

Given the high complexity, lack of output schema, and single required action parameter, the description is complete enough for correct invocation. It enumerates actions, required parameters, return shape, pagination behavior, boundaries, and examples. Nothing an agent needs to choose an action correctly is missing.

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 description coverage is 100%, so the schema already documents each parameter, including required/optional action mappings and constraints. The description's USAGE list mirrors that mapping and adds usage examples, but it does not introduce substantial meaning beyond what the structured schema provides. Baseline 3 is appropriate.

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 states the specific resource and scope: raw Twitter/X operations on a named account, tweet, search, list, or community. It explicitly distinguishes itself from siblings signal(kol_call) and news(sources=["twitter"]) in the BOUNDARIES section. An agent can tell what this tool is for 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 Guidelines5/5

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

It gives explicit when-to-use and when-not-to-use guidance: use twitter for raw ops on a named account or specific tweet, use signal for KOL calls, and use news for general crypto/news tweet content. The USAGE block also maps each action to its required parameters, leaving little to inference.

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