Skip to main content
Glama

agent

Processes diverse tasks by intelligently selecting a Grok model and activating built-in tools including web search and code execution, with optional session persistence.

Instructions

Run the unified UniGrok agent on any task. This is the headline entry point — use it by default for anything nontrivial instead of picking a specialized tool.

It auto-routes across Grok models (planning model for reasoning-heavy tasks, coding model otherwise), gives the model its full action space on every request — xAI server-side web search, X search, and sandboxed code execution plus local file, git, and test tools — and lets the model decide for itself whether to act. Pass a session name and it remembers prior turns, including tool observations, so multi-step work continues across calls. When the client requests progress (MCP progressToken), depth and tool progress is reported live via the injected FastMCP context.

Args: task: The goal, question, or task for the agent. session: Optional session name. Persists conversation history and tool traces so later calls can continue the work. mode: "auto" (default) self-routes; "fast" forces a single toolless completion for trivial prompts; "reasoning" pins the planning model; "thinking" runs the agent loop plus a schema-enforced reflection review for the hardest tasks (slowest, most expensive); "research" runs multi-agent research on the planning model (agent_count from UNIGROK_RESEARCH_AGENT_COUNT, 4 or 16) with inline citations requested — sources come back under citations. model: Optional Grok model id. Leave unset to let routing choose. require_reasoning_level: Minimum required Grok reasoning level (low, medium, high).

Returns: AgentResult containing execution metadata and responses.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoauto
taskYes
modelNo
sessionNo
require_reasoning_levelNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
whyNoRouter decision trace (Grok-native).auto
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.).
traceNoMulti-agent step trace (for grok_agent research mode).
tokensNoTotal tokens consumed.
profileNoInternal routing profile.
cost_usdNoExact USD cost from xAI billing metadata.
degradedNoTrue if fallback occurred.
responseYesRaw model output or primary content.
citationsNoNative xAI/X citations with URL + snippet.
latency_secNo
finish_reasonNounknown
reasoning_effortNoGrok 4.5+ native reasoning level.
Behavior5/5

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

Describes auto-routing across Grok models, session memory, progress reporting, mode behaviors including multi-agent research, and available action spaces, all beyond the empty annotations.

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?

Well-structured with clear sections and front-loaded purpose, though slightly verbose; every sentence adds value but could be tightened slightly.

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?

Covers all aspects: parameters, behavior, return types (AgentResult), multi-step capabilities, and progress reporting, making it fully self-contained given the complexity and existing output 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?

Adds detailed meaning to all parameters (task, session, mode with enum descriptions, model, require_reasoning_level) despite 0% schema coverage, compensating fully.

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?

Clearly states it runs the unified UniGrok agent on any task and positions it as the default for nontrivial tasks, distinguishing it from specialized sibling tools.

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

Usage Guidelines5/5

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

Explicitly says to use by default for nontrivial tasks instead of specialized tools, and describes modes (auto, fast, reasoning, thinking, research) with their appropriate contexts.

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