Skip to main content
Glama

web_search

Read-only

Query the web using real-time search results. Optionally restrict or exclude domains to refine answers.

Instructions

Query the web using xAI's real-time web search tool.

Args: prompt: The research question or search instruction. allowed_domains: Restrict search to these domains (e.g. ["arxiv.org"]). excluded_domains: Domains to exclude from search results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYes
allowed_domainsNo
excluded_domainsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNoStructured payload for web_search / x_search / code_execution.
textNoHuman-formatted output (includes footers, citations, cost summary).
modelYesActual executing model ID (e.g. 'grok-4.5').
planeNoAPI
routeYesHigh-level route (fast/agentic/research/etc.).
tokensNoTotal tokens consumed.
profileNoInternal routing profile.
cost_usdNoExact USD cost from xAI billing metadata.
responseYesRaw model output or primary content.
citationsNoNative xAI/X citations with URL + snippet.
latency_secNo
finish_reasonNounknown
reasoning_effortNoGrok 4.5+ native reasoning level.
Behavior3/5

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

Annotations already declare readOnlyHint=true, establishing a safe read operation. The description adds 'real-time' context, but does not disclose rate limits, result format, or other behavioral traits beyond the annotation's safety profile. With annotations covering the core safety trait, a score of 3 is appropriate.

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 exceptionally concise: a single-sentence purpose followed by a clean Args list. It front-loads the core verb and resource, and every line adds value. No word is wasted.

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?

Given the tool's complexity and the presence of an output schema, the description is largely complete. It covers purpose and parameters. It doesn't specify pagination or result count, but for a web search tool, the needed context is provided. A slight gap is the lack of mention of result structure, but the output schema fills that.

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 coverage is 0%, so the description must compensate. It clearly explains each parameter: 'prompt: The research question or search instruction', 'allowed_domains: Restrict search to these domains ...', 'excluded_domains: Domains to exclude'. This adds significant meaning beyond the raw schema, which only provides types and defaults.

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 states the tool's purpose: 'Query the web using xAI's real-time web search tool.' The verb 'query' and resource 'web' are specific, and the tool name 'web_search' reinforces its function. Among siblings, 'x_search' may be related, but the description distinguishes by focusing on general web search.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'x_search' or 'search_knowledge'. It lacks explicit when-to-use, when-not-to-use, or alternative recommendations, leaving the agent without context for selection.

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/djtelicloud/grok-mcp-server'

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