Skip to main content
Glama
TweetAPI MCP

TweetAPI MCP

Official

Search Tweets And Users

tweetapi_search
Read-onlyIdempotent

Search X posts and accounts by keyword or advanced operators, choosing Latest, Top, People, Photos, or Videos. Returns one page per call with a cursor to fetch the next.

Instructions

Search X for posts or accounts, like the x.com search box. type picks the results: Latest or Top for posts, People for accounts, Photos or Videos for posts with media. For Lists use tweetapi_list_search; for communities use tweetapi_community_search. Read-only. Needs a TweetAPI API key and makes one TweetAPI request per call, usually costing 1 unit; each result includes a cost estimate. Returns one page: to get the next one, call again with cursor set to this result's completeness.nextCursor.

Input Schema

NameRequiredDescriptionDefault
typeNoWhich results to return: Latest (default) or Top for posts, People for accounts, Photos or Videos for posts with media.Latest
queryYesSearch text, 1 to 512 characters, with the same syntax and operators as x.com search, for example from:jack, "exact phrase", lang:en or since:2026-01-01.
cursorNocompleteness.nextCursor from the previous page. Omit it for the first page.
responseFormatNofull (default) returns TweetAPI's JSON unchanged. compact keeps full post text, IDs, links, original dates, counts, and cursors but drops bulky fields; output.fieldsOmitted lists what was dropped.

Output Schema

NameRequiredDescriptionDefault
costYes
modeYes
toolYes
noticeYes
outputYes
resultYes
endpointYes
usageDocsNo
paginationNoPagination exactly as TweetAPI returned it.
statusCodeYes
retrievedAtYesWhen the MCP server received this response (ISO 8601). Not the post or profile date, and not a promise that X's data was fresh at that moment.
completenessYes
resolvedInputNoIdentifiers the MCP server parsed from links or @handles before calling TweetAPI.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.3.3
    • addedInput schema / properties / cursor / description
      Added value: +"completeness.nextCursor from the previous page. Omit it for the first page."
    • addedInput schema / properties / query / description
      Added value: +"Search text, 1 to 512 characters, with the same syntax and operators as x.com search, for example from:jack, \"exact phrase\", lang:en or since:2026-01-01."
    • addedInput schema / properties / type / description
      Added value: +"Which results to return: Latest (default) or Top for posts, People for accounts, Photos or Videos for posts with media."
  2. Addedv0.2.1

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only cover the safety profile (readOnly, idempotent, openWorld, non-destructive); the description adds authentication requirements (TweetAPI API key), per-call request/cost economics (one request, usually 1 unit), that results carry a cost estimate, and the exact pagination mechanism. Those are material behaviors an agent cannot infer from annotations or schema.

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?

Four tight sentences ordered by importance: what it does, how `type` chooses results, which siblings to use instead, then operational constraints and pagination. No filler, and the routing information is front-loaded ahead of the cost details.

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?

With an output schema present, return shape need not be explained, and the description still covers auth, cost, and pagination adequately. The only soft spot is that the compact-vs-full responseFormat tradeoff is left entirely to the schema, which is a minor gap rather than a blocker.

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%, and the description largely restates the schema's own text for `type` and `cursor` rather than adding new meaning. It does tie pagination concretely to "this result's completeness.nextCursor", but that is also spelled out in the schema, 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?

Uses a specific verb and resource ("Search X for posts or accounts"), anchors it to a familiar analogue ("like the x.com search box"), and explicitly names the two siblings it is not (tweetapi_list_search, tweetapi_community_search). An agent can route correctly without opening any 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?

The description explains what the `type` values select and then gives explicit when-not guidance by redirecting Lists and communities to their dedicated tools. Combined with the sibling list containing list_search and community_search, the decision boundary is unambiguous.

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