Skip to main content
Glama

keyword_search

Search social media platforms by keywords or hashtags with boolean queries; polls until complete to return posts for sentiment and coordination analysis.

Instructions

Create a keyword/hashtag search across social media platforms (X, Reddit, YouTube, Facebook, Instagram, Threads, Bluesky, and more). Polls until the search is complete and returns the full results. Oversized responses are truncated (truncated: true, largest post arrays shortened) — read the complete post list in pages with get_keyword_search_posts (offset, limit, fields=lean, one platform at a time). A status of results_pending means the search succeeded but results are still being written; fetch them with get_keyword_search.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "keyword_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesSearch query. Expects KEYWORDS, not prose — a plain multi-word query is token-OR-matched server-side (each word matched independently), which pulls in unrelated posts and pollutes the sentiment/coordination analytics. ALWAYS prefer boolean syntax: AND = both required (Tesla AND battery); OR = synonyms/variants (EV OR "electric vehicle"); NOT = exclude noise (Tesla NOT "Nikola Tesla"); quotes = exact phrase ("Sherrod Brown"); parentheses = grouping. Example: "Sherrod Brown" AND (Husted OR "Ohio Senate") NOT satire. For broad topics, run several focused boolean searches rather than one wide query.
sort_byNoThe order X posts are collected in, which decides which posts come back when there are more than max_post. "engagement" returns the most engaged posts of the period: do not add min_faves: to the query with it, the threshold is set for you. "time" returns the most recent posts: add min_faves:N to the query to set your own threshold.
end_dateNoEnd of the period, in the same format as start_date: a date includes that whole day, a Unix timestamp is the exact end of the window. When one of the two is a Unix timestamp the other must be one too, and the search must be of X only.
max_postNoMaximum number of posts to retrieve per platform (default: 100). A search of X only (platforms: ["twitter"]) takes up to 1000; a search that includes any other platform takes up to 100, and a larger number is lowered to 100.
enable_aiNoWhether Rolli runs its AI analysis on the posts: sentiment, summaries and the topic tree (default: true). Pass false to collect the raw posts only, which is faster; use it when you will analyse the posts yourself. A search made with false has no topic tree.
platformsNoPlatforms to search (default: twitter, reddit, bluesky, youtube)
start_dateNoStart of the period: a date (YYYY-MM-DD), read as a whole UTC day. On a search of X only (platforms: ["twitter"]) it can instead be a Unix timestamp in seconds, a number, to search down to the second.
sentiment_targetNoWhat each post's sentiment is measured towards, for example "data centers". Without it the AI analysis picks a target from the posts. Has no effect with enable_ai: false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed13 schema fields changedv1.7.0
    • addedInput schema / properties / enable_ai
      Added value: +{
      +  "description": "Whether Rolli runs its AI analysis on the posts: sentiment, summaries and the topic tree (default: true). Pass false to collect the raw posts only, which is faster; use it when you will analyse the posts yourself. A search made with false has no topic tree.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / end_date / anyOf
      Added value: +[
      +  {
      +    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +    "type": "string"
      +  },
      +  {
      +    "maximum": 9999999999,
      +    "minimum": 100000000,
      +    "type": "integer"
      +  }
      +]
    • changedInput schema / properties / end_date / description
      Previous value: -"End date (YYYY-MM-DD)"New value: +"End of the period, in the same format as start_date: a date includes that whole day, a Unix timestamp is the exact end of the window. When one of the two is a Unix timestamp the other must be one too, and the search must be of X only."
    • removedInput schema / properties / end_date / pattern
      Removed value: -"^\\d{4}-\\d{2}-\\d{2}$"
    • removedInput schema / properties / end_date / type
      Removed value: -"string"
    • changedInput schema / properties / max_post / description
      Previous value: -"Maximum number of posts to retrieve (default: 100)"New value: +"Maximum number of posts to retrieve per platform (default: 100). A search of X only (platforms: [\"twitter\"]) takes up to 1000; a search that includes any other platform takes up to 100, and a larger number is lowered to 100."
    • changedInput schema / properties / max_post / maximum
      Previous value: -10000New value: +1000
    • addedInput schema / properties / sentiment_target
      Added value: +{
      +  "description": "What each post's sentiment is measured towards, for example \"data centers\". Without it the AI analysis picks a target from the posts. Has no effect with enable_ai: false.",
      +  "maxLength": 200,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / sort_by
      Added value: +{
      +  "description": "The order X posts are collected in, which decides which posts come back when there are more than max_post. \"engagement\" returns the most engaged posts of the period: do not add min_faves: to the query with it, the threshold is set for you. \"time\" returns the most recent posts: add min_faves:N to the query to set your own threshold.",
      +  "enum": [
      +    "engagement",
      +    "time"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / start_date / anyOf
      Added value: +[
      +  {
      +    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +    "type": "string"
      +  },
      +  {
      +    "maximum": 9999999999,
      +    "minimum": 100000000,
      +    "type": "integer"
      +  }
      +]
    • changedInput schema / properties / start_date / description
      Previous value: -"Start date (YYYY-MM-DD)"New value: +"Start of the period: a date (YYYY-MM-DD), read as a whole UTC day. On a search of X only (platforms: [\"twitter\"]) it can instead be a Unix timestamp in seconds, a number, to search down to the second."
    • removedInput schema / properties / start_date / pattern
      Removed value: -"^\\d{4}-\\d{2}-\\d{2}$"
    • removedInput schema / properties / start_date / type
      Removed value: -"string"
  2. Changed1 schema field changedv1.5.0
    • removedInput schema / additionalProperties
      Removed value: -false
  3. Changed2 schema fields changedv1.4.0
    • changedInput schema / properties / platforms / items / enum
      Previous value: -[
      -  "twitter",
      -  "reddit",
      -  "bluesky",
      -  "youtube",
      -  "linkedin",
      -  "facebook",
      -  "instagram",
      -  "weibo"
      -]New value: +[
      +  "twitter",
      +  "reddit",
      +  "bluesky",
      +  "youtube",
      +  "facebook",
      +  "instagram",
      +  "threads"
      +]
    • changedInput schema / properties / query / description
      Previous value: -"Search query (keyword or hashtag)"New value: +"Search query. Expects KEYWORDS, not prose — a plain multi-word query is token-OR-matched server-side (each word matched independently), which pulls in unrelated posts and pollutes the sentiment/coordination analytics. ALWAYS prefer boolean syntax: AND = both required (Tesla AND battery); OR = synonyms/variants (EV OR \"electric vehicle\"); NOT = exclude noise (Tesla NOT \"Nikola Tesla\"); quotes = exact phrase (\"Sherrod Brown\"); parentheses = grouping. Example: \"Sherrod Brown\" AND (Husted OR \"Ohio Senate\") NOT satire. For broad topics, run several focused boolean searches rather than one wide query."
  4. First observedv1.1.7

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations supplied, the description carries the load and does well: it discloses that the call polls until completion (implying long runtime), that oversized responses are truncated with a truncated: true flag, and that results_pending means the search succeeded but writes are still in flight. It does not cover failure modes, cost/latency of AI analysis, or permissions, so it stops short of full disclosure.

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 sentences, front-loaded with what is created, then truncation handling, then the pending-status case. No restatement of the name or filler; each sentence carries a decision-relevant fact.

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?

For an 8-parameter, long-polling search tool with no output schema, the description covers the important behavioral cases (truncation, pending results, follow-up readers). It is slightly thin on what a successful payload actually contains (posts plus sentiment/summary/topic tree) and on expected latency, but the essential calling information is present.

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%, including boolean query syntax, date/timestamp rules, max_post caps and enable_ai effects, so the schema already does the semantic work. The description adds no parameter-level meaning of its own beyond naming offset/limit/fields for the sibling pagination tool.

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 ("Create a keyword/hashtag search") plus the exact scope (X, Reddit, YouTube, Facebook, Instagram, Threads, Bluesky), and explicitly separates itself from get_keyword_search_posts and get_keyword_search. An agent can tell what it creates and what it returns without opening the 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 concrete routing rules for two follow-up paths: truncated responses go to get_keyword_search_posts with per-platform paging, and results_pending goes to get_keyword_search. It does not say when to pick this over expert_search or user_search, which are the other search-creation siblings, so the when-not guidance is incomplete.

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