Skip to main content
Glama

Search tweets with X advanced-search operators

x_search
Read-onlyIdempotent

Search tweets with X advanced-search operators. Read-only: returns public data and changes nothing. Costs 1 credit per result returned, with a minimum of 1 credit per request.

Input Schema

NameRequiredDescriptionDefault
langNoBCP-47 language filter e.g. "en", "ja" (maps to `lang:XX`).
countYesNumber of results to return (1–20). Defaults to 10.
queryYesRaw search query — supports all X advanced-search operators, e.g. "openai lang:en".
cursorNoThe previous response's `nextCursor`, to fetch the next page. Omit it for the first page.
sortOrderNoResult ordering: "Latest" = chronological newest-first (default), "Top" = X's engagement ranking.
withinHoursNoOnly return tweets newer than this many hours.

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 readOnlyHint, idempotentHint, non-destructive, and openWorld, so the safety profile is covered structurally. The description adds genuinely new information beyond that: an explicit per-result credit cost with a minimum of 1 credit per request, which an agent needs for cost-aware planning. It does not cover rate limits or pagination behavior, keeping it at 4.

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 short sentences, front-loaded with purpose, then safety, then cost. No filler, no restatement of the title, and each sentence carries distinct information an agent would otherwise lack.

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?

With a fully documented six-parameter schema and complete annotations, the description only needs to add cost and confirmation of read-only behavior, which it does. The remaining gap is pagination/return-shape context (cursor is only explained in the schema), which is minor given no output schema exists to describe results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every parameter (query operators, lang, count bounds, cursor, sortOrder enum, withinHours) is already documented in the schema. The description's mention of advanced-search operators echoes the query field's own description rather than extending it, so the baseline of 3 applies.

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 tweets') and names the mechanism ('X advanced-search operators'), which separates it from sibling readers like x_get_user_tweets, x_get_tweet_detail, and x_search_users. It stops short of explicitly naming a sibling to route against, so it lands at 4 rather than 5.

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?

Usage is only implied: an agent can infer this is the tool for keyword/operator-based tweet discovery, but the description gives no explicit when-to-use or when-not-to-use guidance, and never points at alternatives such as x_search_users for account lookups or x_get_user_tweets for a single user's timeline.

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