Skip to main content
Glama
TweetAPI MCP

TweetAPI MCP

Official

Get Trends

tweetapi_trends
Read-onlyIdempotent

Fetch trending topics on X worldwide, by country code, or by WOEID location. Omit both parameters to retrieve global trends.

Instructions

Fetch the trending topics X shows worldwide, in a country, or at a location. Pass country (a two-letter code such as US) or woeid (from tweetapi_trend_locations), not both; omit both for worldwide. Not every country is supported, and an unsupported one returns not found instead of worldwide trends. Read-only. Needs a TweetAPI API key and makes one TweetAPI request per call, usually costing 1 unit; each result includes a cost estimate.

Input Schema

NameRequiredDescriptionDefault
woeidNoWhere On Earth ID of a location from tweetapi_trend_locations, or 1 for worldwide. Cannot be combined with country.
countryNoTwo-letter country code such as US or IT (case-insensitive). Cannot be combined with woeid.

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. Addedv0.2.1

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent and open-world, and the description adds substantial context on top: it requires a TweetAPI API key, makes exactly one request per call at roughly 1 unit, surfaces a cost estimate in each result, and specifies the error behavior for unsupported countries.

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, front-loaded with what is fetched before the parameter rules, then cost and error behavior. No filler and nothing repeated without purpose.

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?

An output schema covers return shape, so the description correctly focuses on selection rules, prerequisites, cost, and failure modes. Nothing an agent needs in order to call this correctly is missing.

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% and the schema already documents the mutual exclusivity and formats, so guidance like 'two-letter code such as US' is somewhat duplicative. The description still adds meaning the schema lacks by stating that omitting both parameters yields worldwide trends.

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 and resource ('Fetch the trending topics X shows') plus the three scope modes (worldwide, country, location). It also distinguishes itself from the sibling tweetapi_trend_locations by naming it as the source of woeid values rather than a substitute.

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?

Gives explicit selection rules: pass country OR woeid, never both, omit both for worldwide, and use tweetapi_trend_locations to obtain a woeid. It also warns that an unsupported country fails with not found rather than falling back to worldwide, which prevents a common misuse.

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