Skip to main content
Glama
darkangelpraha

x.ai Grok MCP Server

chat_completion

Send chat completion requests to the x.ai Grok API to generate AI responses. Supports system messages, user messages, and configurable parameters for different Grok models.

Instructions

Send a chat completion request to x.ai Grok API. Supports system messages, user messages, and various models (grok-beta, grok-2-latest, grok-4-latest).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messagesYesArray of chat messages. Each message should have 'role' (system/user/assistant) and 'content' (string).
modelNoThe Grok model to use. Options: grok-beta, grok-2-latest, grok-4-latestgrok-4-latest
temperatureNoSampling temperature between 0 and 2. Higher values make output more random.
max_tokensNoMaximum number of tokens to generate
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions the API target and supported features but fails to disclose critical behavioral traits: whether this is a read/write operation, authentication needs, rate limits, response format, error handling, or costs. For an API call tool with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves.

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?

The description is a single, efficient sentence that front-loads the core purpose and key features. It avoids redundancy and wastes no words, though it could be slightly more structured for clarity. Every element earns its place, making it appropriately concise for the tool's complexity.

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

Completeness2/5

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

Given the tool's complexity (API interaction with 4 parameters) and lack of annotations or output schema, the description is incomplete. It covers basic functionality but misses essential context: no information on return values, error cases, authentication, or operational constraints. This leaves the agent under-informed for safe and effective use.

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%, providing detailed documentation for all 4 parameters. The description adds minimal value beyond the schema, only reiterating supported models and message roles without new syntax or format details. With high schema coverage, the baseline score of 3 is appropriate, as the description doesn't significantly enhance parameter understanding.

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 clearly states the action ('Send a chat completion request') and target resource ('to x.ai Grok API'), with specific mention of supported message types and models. It distinguishes this as an API interaction tool, though without sibling tools, differentiation isn't applicable. The purpose is specific but could be more precise about the exact function beyond 'send a request'.

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, prerequisites, or contextual constraints. It mentions supported features but lacks explicit usage scenarios, exclusions, or comparisons. Without sibling tools, this is less critical, but still a gap for effective agent decision-making.

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

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