Skip to main content
Glama
TwitterAPI.io MCP Server

TwitterAPI.io MCP Server

Official

search_tweets

Find tweets by keyword, topic, or specific date range with advanced operators, including historical archives and paginated results.

Instructions

Primary choice for keyword, topic, or date-range tweet searches. Supports full advanced search operators (from:, to:, since:YYYY-MM-DD, until:YYYY-MM-DD, lang:, filter:, -filter:retweets, has:images, OR). Use this instead of get_user_last_tweets whenever querying specific date windows or historical archives (~20 tweets per page).

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>",
      "queryType": "<queryType>"
    },
    "name": "search_tweets"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesAdvanced 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 the first page (~20 tweets per page).
queryTypeYes'Latest' returns most recent tweets first; 'Top' returns highest-engagement tweets first. Default to 'Latest' for time-sensitive queries.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does disclose useful operating facts (historical archive access, ~20 results per page), but it never confirms the read-only nature, any rate limits or result caps, or what a response contains despite there being no output schema.

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?

Two front-loaded sentences: the primary selection rule comes first, then the routing exception. The long inline operator list duplicates the schema's query description, which is the only real waste.

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 a three-parameter search tool with full schema coverage and a required enum explained by the schema, this is close to sufficient, including page-size expectations. Without an output schema it would be better if it sketched the shape of returned tweets, but nothing essential to invoking it 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 coverage is 100%, so query, cursor, and queryType are already fully documented in the schema. The description's operator list largely restates the schema's query parameter rather than adding syntax, precedence, or edge-case meaning, so the baseline of 3 applies.

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 with a specific verb and resource ('keyword, topic, or date-range tweet searches') and immediately distinguishes this tool from the sibling get_user_last_tweets, making the split clear 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 explicitly names the alternative and the exact condition that selects this tool: use it 'instead of get_user_last_tweets whenever querying specific date windows or historical archives.' That is a full when-to-use / when-to-use-something-else rule.

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