Skip to main content
Glama

Get an X account's or community's posts

get_x_posts

Fetch an account's newest posts, about 20 a page with next_cursor for older ones; or, with community_url, the latest posts in a community, one window. Each post has its text, created_at, public_metrics (likes, reposts, replies, quotes, bookmarks, views), media, hashtags and mentions. Give exactly one of username or url or community_url. Costs 13 credits (3 with community_url), cached or not; a failed call is refunded.

Input Schema

NameRequiredDescriptionDefault
urlNoThe account's profile URL.
freshNoSkip the cache and fetch now. Charged normally. Not available on trial credits — buy any pack to unlock it.
cursorNoThe `meta.next_cursor` from the previous page. Omit for the first page.
usernameNoThe account's username. A leading @ is fine.
community_urlNoA community's URL, `https://x.com/i/communities/<id>`: its latest posts.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / community_url / examples
      Added value: +[
      +  "https://x.com/i/communities/1471580197908586507"
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / username / description
      Previous value: -"The account's username, without the @."New value: +"The account's username. A leading @ is fine."
  3. First observed

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses page size (~20), cursor-based pagination, cache-vs-fresh behavior, credit cost (13, or 3 with community_url), and that failed calls are refunded. That is materially more behavioral context than a safety hint would give.

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?

Front-loaded with the core action and its two modes, then pagination, then returned fields, then cost. Three dense sentences with no filler; even the credit/refund sentence earns its place for an agent deciding whether to call.

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?

No output schema exists, so the description enumerates the returned shape (text, created_at, public_metrics, media, hashtags, mentions), and all five parameters are covered between schema and description. Cost, pagination, and input constraints are all present.

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 baseline is 3. The description adds genuine meaning beyond the schema by stating the mutual-exclusivity constraint on `username`/`url`/`community_url` (the schema has no required fields and no oneOf) and by mapping `next_cursor` to the `cursor` parameter.

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?

States a specific verb+resource (fetch an account's newest posts / a community's latest posts) with scope qualifiers that separate it from get_x_post (single post), get_x_community, and search_x. 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 Guidelines4/5

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

Gives clear selection conditions: use `community_url` for a community's latest posts in one window, otherwise paginate an account's posts via `next_cursor`. It also states the exclusivity rule ('give exactly one of username or url or community_url'). It does not name sibling alternatives (get_x_post, search_x) for the single-post or search cases, so it stops short of a 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.