Skip to main content
Glama

Search tweets

search_tweets
Read-onlyIdempotent

Search X like the search box. Supports X search operators in the query, e.g. from:user, to:user, "exact phrase", lang:en, since:2025-01-01, until:2025-02-01, min_faves:100, filter:media, -filter:replies. category Latest gives newest first; People returns accounts instead of tweets. Paginated.

Input Schema

NameRequiredDescriptionDefault
countNoHow many results to request per page (default 20). X may return slightly more or fewer.
cursorNoPagination cursor. Leave empty for the first page; pass the next_cursor from a previous result to get the next page.
formatNoResponse format (default simple). simple: compact JSON with flat camelCase tweets and users, about 60% fewer tokens. raw: X's full GraphQL JSON, only needed for fields simple leaves out (cards, polls, edit history, community notes).
categoryNoResult tab: Top (default), Latest, People, Photos or Videos.
max_charsNoMaximum characters of JSON to return (default 50000). Longer output is cut with a [TRUNCATED] marker. Lower it to save context, raise it if you need the full response.
searchItemYesSearch query, max 512 characters. May contain X search operators.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare this as a read-only, open-world, idempotent, non-destructive operation. Beyond that, the description adds useful behavioral context: X search operator support, category-specific behavior for Latest and People, and pagination. It does not discuss rate limits or authentication, but the annotation coverage lowers the burden.

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 front-loaded with the core purpose and then efficiently covers operators, category behavior, and pagination. The operator list is dense but purposeful; no sentence is wasted, though it could be slightly more compact.

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 search tool with full schema coverage and strong annotations, the description covers the key behavioral details an agent needs: query operators, category tabs, and pagination. Return formatting and truncation behavior are handled by the schema, so the description is largely complete.

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 is 100%, so all parameters are already documented in the schema. The description still adds value by explaining supported X search operators for searchItem and clarifying category semantics for Latest and People, going beyond the enum labels alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Search X like the search box'. It also clarifies category behavior, including that People returns accounts rather than tweets. It does not explicitly distinguish itself from siblings like get_user_tweets or search_communities, so it falls short of full sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

The description gives implied usage through operator examples and category behavior, which helps an agent understand how to use search effectively. However, it does not explicitly say when to choose this tool over alternatives such as get_user_tweets, get_tweet, or search_communities.

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.