Skip to main content
Glama

Weir: Reddit and X (Twitter) data

Search X posts

search_x
Read-onlyIdempotent

Search public X (Twitter) posts. Combine query or phrase with filters such as fromUsers, mentions, hashtags, language, minLikes, since/until and onlyOriginal; at least one of query, phrase, hashtags, fromUsers, toUsers or mentions is required. Returns X's own fields: text, author (an object), likeCount, retweetCount, replyCount, viewCount (counts can be null), createdAt, url. X only: search Reddit separately with search_reddit. Costs 1 credit + 1 credit per post returned. When meta.nextCursor is set, call again with cursor set to it for the next page.

Input Schema

NameRequiredDescriptionDefault
sortNolatest (default) or top.latest
limitNoMost posts to return, 1-50. Default 10. X serves about 20 a page whatever is asked, so for more, call again with the cursor.
queryNoKeywords, using X search syntax if useful.
sinceNoOnly posts at or after this ISO 8601 time.
untilNoOnly posts before this ISO 8601 time.
cursorNoOpaque cursor from the previous page's `meta.nextCursor`. Pass it back unchanged, with the same path and query parameters; a cursor from another request is rejected with 400.
listIdNoOnly posts by members of this public List.
phraseNoAn exact phrase that must appear.
sinceIdNoOnly posts newer than this post id, exclusive. The way to resume a feed: pass the newest id already seen.
toUsersNoReplying to any of these usernames.
untilIdNoOnly posts older than this post id, exclusive.
anyWordsNoAt least one of these words must appear.
hashtagsNoPosts carrying any of these hashtags, with or without the `#` (a full-width `#` works too). X also matches posts that only have the words, so those are left out: a page can come back with fewer posts than `limit`, and `meta.nextCursor` still leads on.
languageNoLanguage X detected, as a BCP-47 tag such as `en`. Indonesian (`id`) and Hebrew (`he`) are searched by the codes X still uses, `in` and `iw`, which is also what posts carry in `lang`. A region is dropped: `pt-BR` searches Portuguese.
mentionsNoMentioning any of these usernames.
minLikesNo
onlyTextNoExclude posts with links.
fromUsersNoPosted by any of these usernames.
onlyLinksNoOnly posts containing a link.
minRepliesNo
minRepostsNo
onlyRepliesNoOnly replies.
excludeWordsNoNone of these words may appear.
onlyOriginalNoExclude replies.
quotedPostIdNoOnly posts quoting this post. `getXQuotes` is the dedicated endpoint for this.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / hashtags / description
      Previous value: -"Any of these hashtags, with or without the `#`."New value: +"Posts carrying any of these hashtags, with or without the `#` (a full-width `#` works too). X also matches posts that only have the words, so those are left out: a page can come back with fewer posts than `limit`, and `meta.nextCursor` still leads on."
  2. Changed1 schema field changed
    • changedInput schema / properties / limit / description
      Previous value: -"Results to return, 1-50. Default 10; widen only after the first page proved useful."New value: +"Most posts to return, 1-50. Default 10. X serves about 20 a page whatever is asked, so for more, call again with the cursor."
  3. Changed1 schema field changed
    • changedInput schema / properties / language / description
      Previous value: -"Language X detected, as a BCP-47 tag such as `en`."New value: +"Language X detected, as a BCP-47 tag such as `en`. Indonesian (`id`) and Hebrew (`he`) are searched by the codes X still uses, `in` and `iw`, which is also what posts carry in `lang`. A region is dropped: `pt-BR` searches Portuguese."
  4. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, so safety is covered; the description earns credit for adding the cost model ("1 credit + 1 credit per post returned") and pagination protocol ("When meta.nextCursor is set, call again with cursor set to it"). It also warns that count fields can be null, which prevents a null-vs-zero misreading. Rate limits and failure modes beyond cursors are not covered.

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?

Three dense sentences that are front-loaded with purpose, then constraints, then return shape, then cost, then pagination — a sensible order for a 25-parameter tool. Every clause carries an operational fact; nothing restates the title or annotations.

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?

With no output schema, the description carries the return-value burden and does so by enumerating text, author object, count fields (with nullability), createdAt and url. Combined with the cost and cursor-resume instructions, an agent has enough to call this correctly and loop through pages without further reference.

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 88%, so the baseline is 3 and the schema already explains most filters. The description adds real meaning the schema cannot express per-parameter: the cross-field requirement that one of six seed parameters must be supplied, plus the naming of the filter families an agent should consider (fromUsers, mentions, hashtags, language, minLikes, since/until, onlyOriginal).

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?

Opens with a specific verb plus resource ("Search public X (Twitter) posts") and immediately names the sibling it is not ("X only: search Reddit separately with search_reddit"). An agent can separate it from search_reddit, get_x_posts and search_x_users 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 Guidelines4/5

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

States a hard precondition ("at least one of query, phrase, hashtags, fromUsers, toUsers or mentions is required") and routes to the alternative platform tool, which is exactly the kind of when/when-not context that matters here. It stops short of saying when to prefer this over get_x_user_posts or get_x_posts for known-account timelines, so it is not a full 5.

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.

Resources