Skip to main content
Glama
kaitoInfra

twitterapi-io-mcp-server

search_tweets

Search Twitter for tweets using advanced operators like date range, user, keyword, or engagement type filters.

Instructions

🎯 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'
queryTypeYes'Latest' returns most recent tweets first; 'Top' returns highest-engagement tweets first. Default to 'Latest' for time-sensitive queries.
cursorNoPagination cursor from a previous response's next_cursor field. Omit for first page. Each page returns ~20 tweets.
Behavior4/5

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

No annotations are provided, so the description bears full burden. It discloses key behaviors: returns ~20 tweets per page, reverse chronological order by default, supports advanced search syntax, exclusive 'until:', and pagination via cursor. It lacks details on rate limits or authentication, but these are acceptable for a search tool.

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 longer than minimal but well-structured and front-loaded with the primary use case and key instructions. Every sentence adds value, with examples being helpful rather than verbose. Minor improvement could be trimming some redundant examples.

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 complexity of the tool (advanced search syntax, pagination, sort types), the description is very complete. It covers edge cases like exclusive 'until:', pagination usage, and result count per page. No output schema exists, but the description implies response structure with next_cursor.

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 100%, but the description adds substantial meaning beyond the schema: it provides concrete examples, date format specification, note about 'until:' being exclusive, and guidance on when to use 'Latest' vs 'Top'. This greatly aids correct usage.

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 it is the primary choice for date-range, historical, and keyword-based tweet queries, with specific verb 'search Twitter/X for tweets matching a query'. It distinguishes from sibling tool get_user_last_tweets by specifying different use cases.

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?

The description explicitly marks itself as 'PRIMARY CHOICE' and provides explicit guidance on when to use this tool versus get_user_last_tweets. It includes detailed usage examples for various scenarios (date ranges, keywords, etc.) and explains formatting.

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/kaitoInfra/twitterapi-io-mcp-server'

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