Skip to main content
Glama
TwitterAPIs

twitterapis

twitter_community_tweets

Read-only

Fetch an X community's timeline, returning the pinned post separately to avoid missing key rules. Supports pagination and ranking by recency or relevance.

Instructions

Read an X Community's own post timeline, cursor-paginated as full tweet objects, with the community's PINNED post returned as its own separate 'pinned' field rather than as an item inside 'tweets'. That split is not cosmetic: X delivers the pinned post under a different timeline instruction and does not repeat it in the feed, so a client that iterates only 'tweets' silently loses it, and it is very often the community's rules post, the single most useful item in the response. To build one flat list, read 'pinned' first if non-null, then 'tweets' (the pinned post is excluded from 'tweets', so there is no duplicate). ranking_mode is a REAL upstream parameter, not a local sort. Use twitter_advanced_search instead when the search should span all of X rather than one community.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoMax posts to return for this page. Defaults to 20 and is clamped to 1-100.
cursorNoOpaque pagination cursor from a previous response's next_cursor field. Omit on the first call.
community_idYesNumeric X community id, the digits in a x.com/i/communities/<id> URL, e.g. '1493446837214187523'.
ranking_modeNoOrdering, sent to X as a real request parameter. 'Recency' is the default and the only value confirmed against a live capture. 'Relevance' is accepted because X's own community tab offers exactly two orderings, but it is NOT confirmed live, so do not depend on it. Any other value is rejected with a 400.
Behavior5/5

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

Beyond the readOnlyHint/openWorldHint annotations, the description adds crucial behavioral detail: pinned posts are returned in a separate 'pinned' field, not repeated in 'tweets', so naive iteration silently loses them. It also warns that ranking_mode is an upstream parameter and that 'Relevance' is not confirmed live, which goes far beyond the schema and annotations.

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?

The description is longer than average, but every sentence carries essential information: response shape, pinned-post pitfall, flat-list construction, ranking_mode semantics, and the alternative tool. The most important answer of 'what does this return and how do I handle it' is front-loaded.

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 adequately defines the key response structure: the top-level 'pinned' field plus the 'tweets' array, and explains how to combine them without duplication. It also covers pagination, sorting caveats, and the principal alternative, so the agent has enough context to invoke and process results correctly.

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?

The schema already has rich descriptions for all four parameters, so the description does not need to repeat them. It still adds meaningful parameter context by explaining that ranking_mode is a real upstream request parameter and cautioning that only 'Recency' is confirmed against a live capture, which helps the agent make safer invocation decisions.

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?

Starts by explicitly saying 'Read an X Community's own post timeline', which identifies the action, resource, and scope. It also distinguishes itself from search tools by emphasizing it returns the community's own feed, not cross-community results.

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?

Directly provides the alternative: 'Use twitter_advanced_search instead when the search should span all of X rather than one community.' This gives the agent a clear when-to-use versus when-not-to-use rule and explicitly names the sibling tool.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/TwitterAPIs/twitterapis-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server