Skip to main content
Glama
Grok2API MCP Server

Grok2API MCP Server

by wousp112

grok_web_search

Search the web and Twitter/X via Grok to retrieve real-time information and current events with structured results and source URLs, so you can answer time-sensitive questions.

Instructions

Search the web or Twitter(X) via Grok for real-time information and up-to-date events, with structured result and source URLs.

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

Input Schema

NameRequiredDescriptionDefault
queryYesThe precise question or topic to search for
languageNoPreferred response language, e.g. zh or en.
time_rangeNoPreferred search lookback window.
max_sourcesNoTarget max source count in structured output (1-20).
output_modeNoResponse style. brief=short actionable, analyst=deeper synthesis, raw=include more raw context.
freshness_daysNoPrefer sources within this many days when possible.
domains_allowlistNoPreferred source domains.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden and only discloses that results are structured with source URLs. It says nothing about rate limits, auth, whether X vs web is user-selectable or automatic, whether 'Preferred' hint parameters can be silently ignored, or how failures behave.

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?

A single front-loaded sentence covering verb, sources, and return characteristics with no wasted wording. It is efficient, though it packs sources and output shape together rather than structuring them for scanning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Schema covers parameters fully and the sentence hints at the return shape, but with seven parameters, two enums, and no output schema, an agent still lacks detail on the result structure beyond 'source URLs' and on how multi-source search resolves.

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 all seven parameters are already documented with enums for time_range and output_mode. The description adds no meaning beyond the schema — it never explains how preferences like domains_allowlist or freshness_days interact with time_range.

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?

The description states a specific verb (Search) and resources (web, Twitter/X) plus the value proposition (real-time information, up-to-date events, structured results with source URLs). It implicitly separates itself from grok_stats by focusing on search, though it never names the sibling to reinforce the boundary.

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: 'real-time information and up-to-date events' suggests when the tool is appropriate, but there is no explicit when-to-use/when-not-to-use rule and no guidance on choosing between web and Twitter(X) sources or against an alternative tool.

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

Deploy Server

Other Tools