Skip to main content
Glama

web_search

Search the web and X (Twitter) for real-time information, returning structured citations. Filter by date, domain, or specific X accounts to find current discussions and sources.

Instructions

Deep web + X (Twitter) search. Grok runs the retrieval; you read the sources.

In native mode this calls xAI's Responses API with the real web_search and
x_search tools, so citations come back as structured API data rather than
text the model wrote. X search is the reason to reach for this tool: live
community reaction, developer chatter, and breaking discussion that does not
exist in a search index yet.

Use x_handles to pin the search to specific accounts, and from_date/to_date
to bound it in time (both ISO8601, e.g. 2026-08-01).

Returns:
- session_id: string (pass to get_sources for the full source list)
- content: string (answer only)
- sources_count: int (0 means retrieval genuinely returned nothing -- treat
  any factual claim in content as unverified)
- search_mode: "native" | "legacy" (which path actually served the request)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoOverride search mode for this call: 'native' (Responses API tools), 'legacy' (prompt-only chat/completions), or 'auto'. Empty uses GROK_SEARCH_MODE.
modelNoOptional model ID for this request only. This value is used ONLY when user explicitly provided.
queryYesClear, self-contained natural-language search query.
to_dateNoLatest date to consider, ISO8601 (e.g. 2026-08-23).
platformNoTarget platform to focus on (e.g., 'Twitter', 'GitHub', 'Reddit'). Leave empty for general web search.
from_dateNoEarliest date to consider, ISO8601 (e.g. 2026-08-01). Applies to both web and X search.
x_handlesNoComma-separated X handles to restrict the X search to (max 20), e.g. 'unity,unity3d'. Leading @ optional.
extra_sourcesNoNumber of additional reference results from Tavily/Firecrawl. Set 0 to disable. Default 0.
allowed_domainsNoComma-separated domains to restrict web search to, e.g. 'docs.unity3d.com'.
excluded_domainsNoComma-separated domains to exclude from web search.
exclude_x_handlesNoComma-separated X handles to exclude from the X search (max 20).
Behavior4/5

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

Since no annotations are provided, the description carries the full burden. It discloses the native mode calling xAI's Responses API, explains the meaning of sources_count (0 = no retrieval, claims unverified), and introduces search_mode to indicate which path served the request. It also warns about unverified claims when sources_count is 0, providing practical behavioral context beyond the schema.

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?

The description is well-structured with clear sections and bullet points. It front-loads the primary purpose, then provides usage guidance, and finally explains return fields. Every sentence adds value without redundancy—it's appropriately sized for a tool with 11 parameters and no annotations.

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 a tool with 11 parameters, no annotations, and no output schema, the description compensates by detailing the return fields (session_id, content, sources_count, search_mode) and their implications, including a connection to the get_sources sibling for full source retrieval. It omits authentication and rate-limit details, but for a read-only search tool this is a minor gap; the essential calling conventions are well covered.

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 the baseline is 3. The description adds only minor clarifications: it restates the purpose of x_handles ('pin the search to specific accounts') and from_date/to_date ('bound it in time') with ISO8601 examples, but these are essentially paraphrases of the schema. No significant new meaning is introduced.

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 clearly identifies the tool as a 'Deep web + X (Twitter) search' with a specific retrieval mechanism (Grok) and structured return format. It distinguishes the X-search capability from general web search, making the purpose unambiguous even without naming a sibling explicitly.

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 clear context for when to reach for this tool: 'X search is the reason to reach for this tool: live community reaction, developer chatter, and breaking discussion.' It implies the primary use case and mentions parameter usage for bounding the search, but it does not explicitly name alternative tools (e.g., web_fetch) or provide when-not-to-use guidance.

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/zhehaosun717/sunami-grok-search'

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