Skip to main content
Glama
macrocosm-os

Macrocosmos MCP

Official
by macrocosm-os

query_on_demand_data

Fetch real-time social media posts from X and Reddit by source, username, keyword, or date range. Retrieve targeted data for monitoring, research, or analysis.

Instructions

Fetch real-time social media data from X (Twitter) and Reddit through the Macrocosmos SN13 network. IMPORTANT: This tool requires 'source' parameter to be either 'X' or 'REDDIT' (case-sensitive). Parameters:

  • source (str, REQUIRED): Data platform - must be 'X' or 'REDDIT'

  • usernames (List[str], optional): Up to 5 usernames to monitor.

    • For X: '@' symbol is optional (e.g., ['elonmusk', '@spacex'] both work)

    • NOT available for Reddit

  • keywords (List[str], optional): Up to 5 keywords/hashtags to search

    • For X: any keywords or hashtags (e.g., ['AI', 'crypto', '#bitcoin'])

    • For Reddit: subreddit names (e.g., ['r/astronomy', 'space']) or 'r/all' for all subreddits

  • start_date (str, optional): Start date/datetime in YYYY-MM-DD or ISO format

    • Examples: '2024-04-01' or '2024-01-01T00:00:00Z'

    • Defaults to 24 hours ago from current time if not specified

  • end_date (str, optional): End date/datetime in YYYY-MM-DD or ISO format

    • Examples: '2024-04-25' or '2024-06-03T23:59:59Z'

    • Defaults to current time if not specified

  • limit (int, optional): Maximum number of results to return (range: 1-1000, default: 10)

  • keyword_mode (str, optional): How to match keywords - 'any' (default) or 'all'

    • 'any': returns posts matching ANY of the keywords

    • 'all': returns posts matching ALL of the keywords Default Behavior (when dates not specified): The tool searches the last 24 hours (from current time back to 24 hours ago). Usage Examples:

  1. Get recent tweets from specific users: query_on_demand_data(source='X', usernames=['@elonmusk', '@spacex'], limit=20)

  2. Search tweets by keywords in last 24 hours: query_on_demand_data(source='X', keywords=['AI', 'machine learning'], limit=30)

  3. Monitor specific users AND filter by keywords: query_on_demand_data(source='X', usernames=['@nasa'], keywords=['space', 'mars'], limit=20)

  4. Monitor Reddit subreddits: query_on_demand_data(source='REDDIT', keywords=['r/astronomy', 'space'], limit=50)

  5. Search across all of Reddit with date range: query_on_demand_data(source='REDDIT', keywords=['r/all', 'space'], start_date='2025-04-01', end_date='2025-04-02', limit=50)

  6. Strict keyword matching (requires ALL keywords): query_on_demand_data(source='X', keywords=['AI', 'machine learning'], keyword_mode='all', limit=30)

  7. Precise datetime range search: query_on_demand_data(source='X', keywords=['Bitcoin'], start_date='2024-06-01T00:00:00Z', end_date='2024-06-03T23:59:59Z', limit=100)

Returns: JSON object containing:

  • status: "success" or error information

  • data: Array of posts/tweets with full content, user information, engagement metrics, timestamps, platform-specific metadata, and media attachments

  • meta: Processing statistics (miners queried, response rates, items returned, etc.) Platform-Specific Notes:

  • X (Twitter): '@' symbol is optional for usernames

  • Reddit: Does NOT support username filtering, only subreddit/keyword searches

  • All timestamps returned in UTC format

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
sourceYes
end_dateNo
keywordsNo
usernamesNo
start_dateNo
keyword_modeNoany

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
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 excels at it. It discloses default date behavior (last 24 hours), limit range and default, keyword_mode semantics, return envelope contents, UTC timestamps, and platform-specific constraints such as username filtering being unavailable for Reddit. No behavioral contradictions or hidden surprises remain.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-organized and front-loaded with the most important constraint, but it is somewhat repetitive: the 'Default Behavior' section restates date defaults already given under start_date and end_date, and the examples are more numerous than strictly necessary. Still, each section has a clear purpose and the overall structure aids comprehension.

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?

Given the tool's moderate complexity, 7 parameters, no annotations, and 0% schema coverage, the description provides everything needed for correct invocation: required values, supported platforms, parameter semantics, default behavior, return format, and platform-specific limitations. The presence of an output schema further reduces the need to document return values in detail.

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

Parameters5/5

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

Schema description coverage is 0%, but the description fully compensates by explaining every parameter: accepted values for source, username limits and @ handling, keyword interpretation per platform, date formats and defaults, limit range, and keyword_mode options. This goes far beyond the bare schema definitions.

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?

The description identifies a specific action ('Fetch real-time social media data') and a specific resource ('X and Reddit through the Macrocosmos SN13 network'), and clarifies the exact data platforms involved. It is clearly distinguishable from the sibling tools, which all concern task/dataset creation and cancellation.

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?

The description gives strong usage context: required source values, case sensitivity, platform-specific capabilities, and multiple concrete invocation examples. It does not explicitly contrast this tool with alternatives, but the sibling tools are unrelated in function, so this is not a significant gap.

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/macrocosm-os/macrocosmos-mcp'

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