Skip to main content
Glama

ask_grok_realtime

Query Grok with real-time web and X search to answer questions needing current information; optionally restrict sources by domain or date.

Instructions

Query Grok with real-time Web Search and/or X Search via xAI's Responses API.

Args: query: Question or research prompt requiring up-to-date information. search_mode: Which live search tools to enable ("both", "web", or "x"). model: Optional xAI model ID (defaults to XAI_DEFAULT_MODEL / grok-4.3). allowed_domains: Restrict web search to at most 5 domains (mutually exclusive with excluded_domains). excluded_domains: Exclude up to 5 domains from web search. from_date: Optional X search start date in YYYY-MM-DD format (UTC). to_date: Optional X search end date in YYYY-MM-DD format (UTC, exclusive).

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": "ask_grok_realtime"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNo
queryYes
to_dateNo
from_dateNo
search_modeNoboth
allowed_domainsNo
excluded_domainsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the burden and mostly succeeds: it discloses the backing API, that search is live, the 5-domain caps, the mutual exclusivity of allowed_domains and excluded_domains, UTC date handling, and that to_date is exclusive. It omits cost/latency or rate-limit expectations and any auth requirements, which keeps it short of a 5.

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?

Front-loaded one-line purpose followed by a compact, scannable Args block with no filler. The docstring formatting is serviceable but slightly less readable than prose bullets, and the default value of search_mode ('both') is left unstated.

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?

For a seven-parameter research tool with an output schema (so return values need no explanation) and no annotations, the description covers every parameter, its constraints, and the API context. An agent has enough to call it correctly without opening the schema.

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%, and the description compensates fully, explaining all seven parameters: the query intent, the three search_mode values, the model default with env-var fallback, both domain lists with limits and mutual exclusivity, and the from_date/to_date format plus inclusive/exclusive semantics.

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 plus the mechanism: 'Query Grok with real-time Web Search and/or X Search via xAI's Responses API.' The real-time/web+X scope implies how it differs from search_x_posts and grok_code_reasoning, but it never names or explicitly contrasts those siblings.

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 through the query arg note ('requiring up-to-date information') and the search_mode enum. There is no explicit statement of when to pick this over search_x_posts for X-only lookups or grok_code_reasoning for non-research work, and no exclusions.

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