Skip to main content
Glama

twitterapi-mcp-server

Search Tweets

search_tweets
Read-only

🎯 PRIMARY CHOICE for date-range / historical / keyword-based tweet queries. Use this (NOT get_user_last_tweets) whenever user asks about a SPECIFIC TIME RANGE or historical tweets: • 'tweets from January 2026' → query='from:elonmusk since:2026-01-01 until:2026-02-01' • 'tweets between X and Y' → 'from:USER since:X until:Y' • 'tweets last week / last month' → translate to since:/until: dates • 'tweets containing keyword X by user Y' → 'from:Y X' • 'older tweets' / 'archive' / 'in 2025' → use date range, not pagination

Date format: YYYY-MM-DD (UTC midnight). 'until:' is exclusive (until:2026-02-01 = up to Jan 31).

General: Search Twitter/X for tweets matching a query. Supports the full Twitter advanced search syntax (from:, to:, since:, until:, lang:, filter:, has:, -, OR, etc). Returns ~20 tweets per page in reverse chronological order ('Latest') or by engagement ('Top'). Use this for keyword research, monitoring mentions of a brand/topic, finding tweets in a date range, or any open-ended tweet discovery.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesTwitter advanced search query string. Supports operators: from:USER, to:USER, since:YYYY-MM-DD, until:YYYY-MM-DD, lang:en, filter:replies, -filter:retweets, has:images, etc. Example: 'from:elonmusk since:2026-01-01 has:images'
cursorNoPagination cursor from a previous response's next_cursor field. Omit for first page. Each page returns ~20 tweets.
queryTypeYes'Latest' returns most recent tweets first; 'Top' returns highest-engagement tweets first. Default to 'Latest' for time-sensitive queries.

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnlyHint/openWorldHint annotations, the description discloses pagination behavior ('Returns ~20 tweets per page'), ordering ('reverse chronological order' vs 'Top'), and date semantics ('until:' is exclusive). It even warns that older/archival queries should use date ranges rather than pagination, which is useful behavioral guidance.

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?

The description is front-loaded with a bold primary-purpose statement, followed by compact examples and a short general section. Every sentence contributes either selection guidance, query syntax, or behavioral details, with no 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?

The description covers when to use, query syntax, date format, ordering, and pagination. It would be slightly stronger if it described the shape of a returned tweet object, since there is no output schema, but the current information is sufficient for correct tool selection and invocation.

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?

Schema coverage for parameters is 100%, so the baseline is 3. The description adds real value through example query constructions like 'from:USER since:X until:Y', the default for queryType ('Default to Latest for time-sensitive queries'), and the YYYY-MM-DD format rule, going beyond the schema text.

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 opens by naming it the 'PRIMARY CHOICE for date-range / historical / keyword-based tweet queries' and then states 'Search Twitter/X for tweets matching a query.' It clearly distinguishes itself from get_user_last_tweets and other siblings, so an agent can identify it without reading schemas.

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 instructions with examples ('tweets from January 2026', 'tweets last week'), and an explicit exclusion ('Use this (NOT get_user_last_tweets) whenever user asks about a SPECIFIC TIME RANGE or historical tweets'). It also lists general use cases like keyword research and brand monitoring.

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.

TDQS

A4.2/5.0
Disambiguation4/5

Most tools cleanly target distinct resources: trends, replies, quotes, retweeters, followers, followings, mentions, and search. However, get_user_info and get_user_about overlap significantly, and get_user_last_tweets vs search_tweets have overlapping capabilities that are only separated by usage warnings.

Naming Consistency5/5

All tools use a consistent snake_case convention with get_ as the dominant verb, followed by a clear noun target: get_trends, get_tweet_replies, get_user_followers, get_tweets_by_ids. search_tweets is the single intentional exception but follows the same predictable pattern.

Tool Count5/5

12 tools is well-scoped for a read-only Twitter/X data-access server. Each tool covers a distinct major data surface—trends, individual tweet interactions, user profiles, relationships, mentions, and search—without unnecessary bloat.

Completeness4/5

The set covers the most common Twitter read workflows: user lookup, timelines, search with date ranges, followers/followings, mentions, and engagement metrics like replies, quotes, and retweeters. Obvious gaps like liking users or list-based lookups are missing, but they are not critical to the server's apparent core purpose.

Resources