Grok MCP
Grok MCP is an MCP server that provides comprehensive access to xAI's Grok API capabilities. You can access multiple Grok models (Grok-4, Grok-4-Fast, Grok-3-Mini, and more) for chat completion with extensive customization options including temperature, max tokens, and system prompts. The server supports reasoning models that provide detailed reasoning alongside responses, image generation from text descriptions, and vision analysis of images using natural language queries (supporting both local files and URLs). It offers live web search with real-time results, source citations, date range filters, country localization, and custom RSS feed integration from news, web, X (Twitter), and RSS sources. You can maintain stateful conversations with context preserved across multiple requests, conversation history management, and the ability to retrieve and delete stored responses (kept for 30 days). Additional features include model discovery to list all available Grok models with their details and creation information.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Grok MCPgenerate an image of a futuristic city skyline at sunset"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Grok-MCP
MCP server for xAI’s Grok API with Web/X search, vision, image/video generation and file support.
Features
Agentic Tool Calling: Web search, X search, code execution, and image generation with multi-step reasoning
Multiple Grok Models: Access to latest models such as grok-4.6, grok-4.5, grok-build-0.1 and more
Image and Video Generation: Create images and videos using Grok Imagine
Vision Capabilities: Analyze images with Grok's vision models
Files API: Upload, manage, and chat with documents
Stateful Conversations: Maintain conversation context as id across multiple requests
Local Chat History: Option to save persistent client side chat history as JSON files in chats/
Related MCP server: Grok Image MCP
Prerequisites
Python 3.11 or higher
xAI API key (Get one here)
Installation
Clone the repository:
git clone https://github.com/merterbak/Grok-MCP.git
cd Grok-MCPCreate a venv environment:
uv venv
source .venv/bin/activate # macOS/Linux or .venv\Scripts\activate on WindowsInstall dependencies:
uv syncConfiguration
Claude Desktop Integration
Add this to your Claude Desktop configuration file:
{
"mcpServers": {
"grok": {
"command": "uv",
"args": [
"--directory",
"/path/to/Grok-MCP",
"run",
"python",
"main.py"
],
"env": {
"XAI_API_KEY": "your_api_key_here"
}
}
}
}Claude Code Integration
Run this command from inside the project directory:
claude mcp add grok-mcp -e XAI_API_KEY=your_api_key_here -- uv run --directory /path/to/Grok-MCP python main.pyOr if you have a .env file with your key:
claude mcp add grok-mcp -- uv run --directory /path/to/Grok-MCP python main.pyVerify it's registered:
claude mcp listFilesystem MCP (Optional)
Claude Desktop can't send uploaded images in the chat to an MCP tool. The easiest way to give access to files directly from your computer is official Filesystem MCP server. After setting it up you’ll be able to just write the image’s file path (such as /Users/mert/Desktop/image.png) in chat and Claude can use it with any vision chat tool.
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/<your-username>/Desktop",
"/Users/<your-username>/Downloads"
]
}
}
}
For stdio:
uv run python main.pyDocker:
docker compose up --buildMcp Inspector:
mcp dev main.pyAvailable Tools
Each tool has a full docstring in src/server.py with its arguments and return format. MCP client surfaces those directly, so this list is just a quick map of what's available.
Note: For using images and files, you must provide paths to chat. See Filesystem MCP (Optional) for setup.
Chat and reasoning
chat— standard chat completion with optional persistent history, multi-agent support, and a per requestservice_tier.chat_with_vision— analyze local or remote images with a Grok vision model.chat_with_files— chat grounded on previously uploaded documents.stateful_chat— continue a server-side stored conversation viaresponse_id.retrieve_stateful_response— fetch a stored response by ID.delete_stateful_response— delete a stored response by ID.
Agentic tools
web_search— autonomous web research with domain filters and citations.x_search— autonomous search over X (Twitter) posts, with handle and date filters.code_executor— solve tasks by running Python in a sandbox.grok_agent— unified agent that mixes files, images, web search, X search, code execution, and server-side image generation. Generated images are written toimages/.
Image and video
generate_image— create or edit images with Grok Imagine (multi-reference editing supported). Passsave=trueto write the results toimages/instead of returning temporary URLs.generate_video— text-to-video, image-to-video, or video editing with Grok Imagine.extend_video— extend an existing generated video with a follow-up prompt.
Files
upload_file— upload a local document.list_files— list uploaded files with sorting.get_file— fetch file metadata by ID.get_file_content— download file content as text.delete_file— delete a file by ID.
Local chat history
list_chat_sessions— list saved sessions inchats/.get_chat_history— get a session's full transcript.clear_chat_history— delete a session's local history file.
Models
list_models— list all Grok language and image models with live pricing.
License
This project is open source and available under the MIT License.
Available Tools
22 toolschatA
Send a text prompt to a Grok model and return its reply.
Replays prior turns from `chats/{session}.json` when a session is given,
then appends the new user message and saves the round trip.
Args:
prompt: User message to send to the model.
session: Optional session name. Loads and appends history to `chats/{session}.json`.
model: Grok model id (default `grok-4.6`).
system_prompt: Optional system instruction prepended to the conversation.
agent_count: 4 or 16. Only valid with `grok-4.20-multi-agent` for multi-agent research.
service_tier: `"default"` or `"priority"`. Priority is processed faster at a higher token price.
show_usage: Append a token usage and cost footer to the reply (default False).
Returns:
The assistant's reply text, plus a token usage and cost footer when `show_usage` is true.
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | grok-4.6 | |
| prompt | Yes | ||
| session | No | ||
| show_usage | No | ||
| agent_count | No | ||
| service_tier | No | ||
| system_prompt | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does well: it discloses that a session causes history to be loaded from and appended to chats/{session}.json, that the new user message and round trip are persisted, and that priority tier costs more. It omits auth requirements, error/rate-limit behavior, and whether a session file is created when absent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded one-line summary followed by compact Args/Returns blocks; every entry carries information. Slightly formulaic and the model default is redundant with the schema, but there is no filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema exists, and the description adequately covers the return value (reply text plus optional usage/cost footer) as well as the stateful side effect on chats/{session}.json. Remaining gaps, such as failure modes and sibling selection, are modest for a 7-param tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description compensates fully by documenting all seven parameters with meaning the schema cannot express: agent_count's allowed values (4 or 16) and model restriction, service_tier semantics, system_prompt prepending behavior, session file path, and show_usage's footer effect.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Send a text prompt to a Grok model and return its reply') and clarifies session replay/append behavior. It does not distinguish itself from close siblings like stateful_chat or grok_agent, so an agent must infer which chat variant to pick.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied through parameter notes rather than stated: it says agent_count is only valid with grok-4.20-multi-agent and explains service_tier's speed/price tradeoff. Nothing says when to choose this over stateful_chat, grok_agent, chat_with_files, or chat_with_vision.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
chat_with_filesA
Chat with Grok using one or more previously uploaded files as context.
Attaches the given `file_ids` to the user turn so Grok can read/quote their
contents. Optional `session` persists local chat history across calls.
Args:
prompt: Question or instruction about the attached files.
file_ids: IDs of files previously returned by `upload_file`.
session: Optional session name for persistent history in `chats/{session}.json`.
model: Grok model id (default `grok-4.6`).
system_prompt: Optional system instruction prepended to the conversation.
show_usage: Append a token usage and cost footer to the reply (default False).
Returns:
Assistant reply, followed by a `**Sources:**` list when the model cites URLs.
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | grok-4.6 | |
| prompt | Yes | ||
| session | No | ||
| file_ids | Yes | ||
| show_usage | No | ||
| system_prompt | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does well: it discloses that file_ids are attached to the user turn, that `session` persists local history to chats/{session}.json, and that show_usage appends a token/cost footer. It omits auth/permission requirements and any indication that session persistence is a local write side effect.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loads the purpose sentence, then uses a compact Args/Returns layout where each line adds information beyond the bare parameter names. The Args block is slightly redundant with the schema titles but still earns its place by adding semantics.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema exists, and the description compensates with a Returns section covering the reply and the optional `**Sources:**` list. Combined with full parameter coverage and session-persistence behavior, an agent has nearly everything needed, with only auth and side-effect details missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate, and it documents all six parameters with meaning beyond the schema: file_ids origin, session file path, model default, system_prompt behavior, and the show_usage footer. It stops short of format/limit details such as how many file_ids are accepted or how session names are validated.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: chat with Grok using previously uploaded files as context. It names the sibling that produces the required input (upload_file) but does not differentiate itself from close siblings like `chat`, `chat_with_vision`, or `stateful_chat`, which an agent would need to pick between.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Implied usage is clear from the prerequisite that file_ids come from upload_file, but there is no explicit when-to-use guidance or statement of when to prefer this over the plain `chat` or `chat_with_vision` tools. The agent must infer routing from the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
chat_with_visionA
Analyze one or more images with a Grok vision model.
Accepts local image paths and/or public URLs in the same call. Local images
are sent as base64 data URIs (JPG/JPEG/PNG only, max 20 MiB each).
Args:
prompt: Question or instruction about the image(s).
session: Optional session name for persistent history in `chats/{session}.json`.
model: Vision-capable Grok model (default `grok-4.6`).
image_paths: Local image file paths to analyze.
image_urls: Public image URLs to analyze.
detail: Image detail level. One of `"auto"`, `"low"`, or `"high"`.
show_usage: Append a token usage and cost footer to the reply (default False).
Returns:
The model's textual answer about the image(s).
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | grok-4.6 | |
| detail | No | auto | |
| prompt | Yes | ||
| session | No | ||
| image_urls | No | ||
| show_usage | No | ||
| image_paths | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It does disclose real behavioral facts: local images are converted to base64 data URIs, only JPG/JPEG/PNG up to 20 MiB each, and session enables persistent history at `chats/{session}.json`. It omits error behavior for invalid/oversized images, auth or rate-limit constraints, and how mixed local+URL batches are ordered.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded summary sentence, then a constraints sentence, then a compact Args block and a one-line Returns. The Args list is not waste here because schema coverage is 0%; every line adds information the agent cannot get from structured fields.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 7-parameter tool with no output schema and no annotations, the description covers the return value ('textual answer about the image(s)'), input formats, size limits, and persistence. The main gap is routing guidance relative to sibling chat tools, but nothing needed to invoke the tool correctly is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% and there are 7 parameters, so the description must compensate — and it documents every one (prompt, session, model, image_paths, image_urls, detail, show_usage) with meaning beyond the bare titles. It adds real value the schema lacks, notably the `detail` enum values auto/low/high (schema has no enum) and the session file location, though it doesn't state constraints like mutual requirement or image-count limits.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Analyze one or more images with a Grok vision model') and the two input modalities (local paths, public URLs), which separates it from the generic chat/chat_with_files siblings. It never names an alternative sibling explicitly, so the differentiation is inferred rather than stated.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is only implied: an agent can infer this is the tool for image analysis, and the description notes local paths and URLs can be mixed in one call. There is no when-to-use vs when-not guidance, no mention of chat, chat_with_files, or stateful_chat as alternatives, and no statement that at least one image source is required.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
clear_chat_historyA
Delete the local history file for a chat session.
Only removes the client-side JSON file. Server-side stored responses are untouched.
Args:
session: Session name whose `chats/{session}.json` file should be deleted.
Returns:
Confirmation string or a not-found message.
| Name | Required | Description | Default |
|---|---|---|---|
| session | No | default |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden. It discloses the destructive nature (delete), scope (local only), and return value (confirmation or not-found). Additional details like authentication or side effects are not needed for this simple operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Extremely concise: one sentence for purpose, then a brief note on scope, followed by Args and Returns sections. Every sentence adds necessary information with no redundancy. Front-loaded with the key action.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given low complexity (1 parameter, no output schema, no nested objects), the description is complete. It explains what the tool does, the parameter, the return value, and the behavioral scope (local vs server). No missing information for effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, but description fully compensates: 'Session name whose chats/{session}.json file should be deleted' explains the parameter's meaning and usage (forms the filename). Adds value beyond the schema definition.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states 'Delete the local history file for a chat session', specifying the action (delete), resource (local history file), and scope (chat session). Distinguishes from sibling tools like 'delete_file' (generic) and 'delete_stateful_response' by focusing on chat history locally.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides clear context by stating it only removes the client-side JSON file and leaves server-side responses untouched, implying when to use this tool (local-only deletion) and when to look elsewhere (server-side). Does not explicitly name alternative tools but offers sufficient situational guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
code_executorA
Solve a task by letting Grok run Python in a stateful sandbox.
The agent iteratively writes and executes Python (with common scientific
libraries) to arrive at a numeric, data, or analysis answer.
Args:
prompt: Task or question requiring computation.
model: Grok model driving the agent (default `grok-4.6`).
max_turns: Cap the number of reasoning/execution turns.
show_usage: Append a token usage and cost footer to the answer (default False).
Returns:
Markdown with the final answer followed by each code execution block's stdout.
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | grok-4.6 | |
| prompt | Yes | ||
| max_turns | No | ||
| show_usage | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden, and it does disclose meaningful traits: statefulness of the sandbox, iterative write/execute behavior, common scientific libraries, and the Markdown return shape with stdout blocks. It omits execution limits, sandbox lifetime/persistence scope, timeout behavior, and any network or side-effect constraints, which matters for a tool that runs arbitrary code.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with the core purpose, then structured Args/Returns sections that map directly to the schema. Slightly verbose in restating the return format, but every element is informative and there is no filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema and no annotations, so the description must cover both the argument contract and the return value — which it does via the Args and Returns sections. For a 4-parameter tool this is largely sufficient; missing operational limits (timeouts, sandbox persistence) are the only notable gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% and the schema provides only titles, so the description must compensate — and it does, documenting all four parameters with meaning and defaults: prompt purpose, the driving model, what max_turns caps, and that show_usage appends a token/cost footer. Only minor gaps remain (e.g., model value options, max_turns default).
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The first sentence gives a specific verb and resource: 'Solve a task by letting Grok run Python in a stateful sandbox,' which clearly identifies this as a sandboxed code-execution tool distinct from chat/search siblings. It does not explicitly name an alternative sibling (e.g., grok_agent), so differentiation is implied rather than stated.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied by 'Task or question requiring computation' and 'numeric, data, or analysis answer,' which tells the agent the kind of request that fits. However, there is no explicit when-to-use guidance versus alternatives like grok_agent, chat, or web_search, and no stated exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
delete_fileA
Permanently delete an uploaded file from xAI.
Args:
file_id: ID of the file to remove.
Returns:
Confirmation string with the deleted file ID.
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description bears full responsibility for behavioral disclosure. It states 'Permanently delete', indicating destructiveness, and mentions the return type. However, it does not detail side effects, permission requirements, or error scenarios.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is highly concise, with three sentences covering purpose, parameter, and return value. No extraneous information is included.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (one parameter, no output schema, no nested objects), the description covers the core behavior adequately. It explains the permanent nature of the deletion and the return value, though it lacks error handling context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0% description coverage, so the description must compensate. The description adds minimal value by labeling the parameter as 'ID of the file to remove', but this largely restates the schema field's name and type.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the operation (Permanently delete) and the resource (uploaded file from xAI). It distinguishes this tool from siblings like get_file, list_files, and upload_file by explicitly describing a delete operation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
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 (e.g., when not to use it, prerequisites, or alternatives). It implicitly states usage via the action 'Permanently delete', but lacks explicit contextual guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
delete_stateful_responseA
Delete a stored chat completion from xAI's servers.
Args:
response_id: ID of the stored response to remove.
Returns:
Confirmation string with the deleted response ID.
| Name | Required | Description | Default |
|---|---|---|---|
| response_id | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It clearly indicates the action deletes a resource from servers and returns a confirmation, implying permanence. However, it lacks details on authorization requirements or potential side effects beyond the deletion itself.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise (three sentences) and well-structured: purpose, argument, return. Every word adds value without any fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (one required parameter) and the lack of an output schema, the description is mostly complete. It covers what, how, and the return value. Minor missing details include error handling for invalid IDs.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description fully compensates by explaining that 'response_id' is the ID of the stored response to remove, adding meaningful context beyond the schema's title and type.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Delete' and the resource 'stored chat completion', making the tool's purpose immediately understandable. It distinguishes itself from sibling tools like 'retrieve_stateful_response' (which retrieves) and 'chat' (which creates).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for removing stored responses but does not explicitly state when to use this tool versus alternatives or provide exclusion criteria. No guidance on prerequisites or potential errors.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
extend_videoA
Extend an existing video with a follow-up prompt.
Continues the source video seamlessly from its last frame. `duration` sets
the length of the extension only, not the total output. For example, a
10 second input plus `duration=5` yields a 15 second final video.
Args:
prompt: What should happen in the extended segment.
video_url: Public URL of the source video (.mp4, 2–15 s).
model: Video model (default `grok-imagine-video`).
duration: Length of the extension in seconds (2–10, default 6).
show_usage: Append a token usage and cost footer to the result (default False).
Returns:
Markdown block with the extended video URL and total duration.
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | grok-imagine-video | |
| prompt | Yes | ||
| duration | No | ||
| video_url | Yes | ||
| show_usage | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, description explains duration is for extension only, returns markdown with URL and total duration. Lacks details on side effects or auth needs.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Concise with a clear top sentence, followed by a paragraph clarifying duration behavior, then a structured Args list. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers parameter semantics and return value; lacks error conditions or edge cases, but overall complete for a tool with no output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, but description fully compensates by explaining each parameter's role, constraints (e.g., video_url .mp4 2-15s, duration 2-10, default 6), and behavior.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States 'Extend an existing video with a follow-up prompt' and explains it continues from the last frame, distinguishing it from generate_video which creates new videos.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Clearly indicates when to use (to extend a video) but does not explicitly state when not to use or mention alternatives like generate_video for creation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_imageA
Generate new images or edit existing ones with Grok Imagine.
Pass `image_paths` and/or `image_urls` to edit images or use them as
visual references. Multiple references are combined in a single call.
Args:
prompt: Image description, or the edit instruction when references are provided.
model: Image model (`grok-imagine-image` or `grok-imagine-image-pro`).
image_paths: Local image files (JPG/PNG) used as edit sources or references.
image_urls: Public image URLs used as edit sources or references.
n: Number of images to generate (1–10).
image_format: `"url"` (default) or `"base64"`. Base64 responses carry no URL,
so they are always saved locally.
aspect_ratio: Aspect ratio like `"16:9"`, `"1:1"`, or `"9:16"`.
resolution: `"1k"` or `"2k"`.
save: Write each image to `images/` and report the local path instead of the
remote URL. Remote URLs are temporary, so save anything you want to keep.
show_usage: Append a token usage and cost footer to the result (default False).
Returns:
Markdown block listing each image as a saved local path when saving, otherwise
as a temporary remote URL.
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | ||
| save | No | ||
| model | No | grok-imagine-image | |
| prompt | Yes | ||
| image_urls | No | ||
| resolution | No | ||
| show_usage | No | ||
| image_paths | No | ||
| aspect_ratio | No | ||
| image_format | No | url |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden and does well: it warns that remote URLs are temporary and that base64 responses are always saved locally, and explains the save and show_usage side effects. It omits permission/auth requirements and any rate or cost limits beyond the optional usage footer.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded one-line purpose followed by scannable Args/Returns sections; nearly every line earns its place. The Args list is long but justified by 10 undocumented parameters, with only minor redundancy around image_paths/image_urls.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 10-parameter, no-annotation, no-output-schema tool, the description supplies a Returns section, save-locally vs temporary-URL behavior, and edit-mode routing. It is complete enough to call correctly, though it lacks error/permission context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must compensate and it does for every one of the 10 parameters: named model variants, allowed file types for image_paths, the 1–10 range for n, the url/base64 semantics of image_format, aspect-ratio examples, resolution values, and save/show_usage effects. This adds substantially more meaning than the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (generate/edit) and resource (images) with the Grok Imagine brand, and immediately distinguishes the two modes: creation vs. reference-based editing. An agent can distinguish it from generate_video and chat_with_vision without opening any schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Clearly states that passing image_paths/image_urls triggers edit/reference mode and that multiple references combine in one call, which is the key routing decision. It does not, however, name sibling alternatives (e.g. generate_video) or state when not to use this tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_videoA
Generate or edit videos with Grok Imagine.
Text-to-video by default. Provide an image to animate (image-to-video), or
a source video to edit. Only one mode per call. Reference images can be
added to guide style and subjects. Generation polls synchronously (xAI's
default timeout is 10 minutes).
Args:
prompt: Video description, or the edit instruction for video editing.
model: Video model (default `grok-imagine-video`).
image_path: Local image to use as the starting frame.
image_url: Public image URL to use as the starting frame.
video_path: Local video to edit (max 20 MB, .mp4, ≤ 8.7s).
video_url: Public video URL to edit (.mp4, ≤ 8.7s).
reference_image_paths: Local images used as style/subject references.
reference_image_urls: Public image URLs used as style/subject references.
duration: Video length in seconds (1–15, ignored when editing).
aspect_ratio: Aspect ratio like `"16:9"` or `"9:16"` (ignored when editing).
resolution: `"480p"` or `"720p"` (ignored when editing).
show_usage: Append a token usage and cost footer to the result (default False).
Returns:
Markdown block with the generated video URL and actual duration.
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | grok-imagine-video | |
| prompt | Yes | ||
| duration | No | ||
| image_url | No | ||
| video_url | No | ||
| image_path | No | ||
| resolution | No | ||
| show_usage | No | ||
| video_path | No | ||
| aspect_ratio | No | ||
| reference_image_urls | No | ||
| reference_image_paths | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It discloses synchronous polling with 10-minute timeout, file size limits for video_path (20 MB, ≤8.7s), and duration limits (1–15s). Missing details on rate limits, authentication needs, behavior on timeout, or parameter incompatibility handling.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is thorough but somewhat lengthy; the first paragraph introduces modes and polling, followed by a bulleted Args list. It is well-structured and front-loaded, but could be more concise by reducing redundancy (e.g., repetition of 'ignored when editing').
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex tool with 12 parameters and no output schema, the description covers modes, parameter interactions, and return value (Markdown with URL and duration). It lacks error handling details and some edge cases, but overall completeness is good.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, but the description provides a detailed Args section explaining each parameter, including defaults, constraints (e.g., duration ignored when editing), and usage context. This adds substantial meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it generates or edits videos with Grok Imagine, explicitly listing three modes (text-to-video, image-to-video, video editing) and reference images for style. This distinguishes it from sibling tools like generate_image or extend_video.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains when to use each mode and that only one mode per call is allowed, and mentions synchronous polling. However, it lacks explicit guidance on when not to use this tool versus alternatives like extend_video, and does not cover prerequisites or error scenarios.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_chat_historyARead-only
Return the full message history for a local chat session.
Args:
session: Session name to load from `chats/{session}.json` (default `default`).
Returns:
Formatted transcript with timestamps and roles, or a not-found message.
| Name | Required | Description | Default |
|---|---|---|---|
| session | No | default |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses read-only nature (confirmed by annotations), format of return (timestamps and roles), and behavior on not-found. Adds detail beyond annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Extremely concise with clear sections for description, args, and returns. No unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Adequate for a simple read-only tool with one parameter. Covers purpose, parameter, and return format. No output schema, so description handles it well.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Explains the session parameter as a file path pattern, adding meaning beyond the schema alone. Schema coverage is 0%, so description provides essential semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states it returns full message history for a local chat session. Distinguishes from siblings like clear_chat_history and list_chat_sessions by specificity to a single session, but lacks explicit differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Implies usage for retrieving history of a specific session, but no guidance on when to use versus alternatives like retrieve_stateful_response or list_chat_sessions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_fileARead-only
Fetch metadata for a single uploaded file.
Args:
file_id: ID returned by `upload_file`.
Returns:
Markdown block with the file's ID, filename, size, and creation time.
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description aligns with the annotation readOnlyHint=true by stating 'Fetch metadata'. It adds the return format (Markdown block with fields) but does not disclose other behaviors like error handling or authorization needs.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is brief with a clear structure: one sentence for purpose, then separated Args and Returns sections. No unnecessary words or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple with one parameter and no output schema. The description covers the input source, the return format, and the core action. It is complete for an agent to use correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema provides no description for the file_id parameter (0% coverage). The description compensates by specifying that the ID is 'returned by upload_file', giving the agent a source for the value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'Fetch' and clearly specifies the resource 'metadata for a single uploaded file'. It distinguishes from siblings like 'get_file_content' by focusing on metadata retrieval.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description states the purpose and the source of the file_id ('returned by upload_file'), which implies when to use it. It does not explicitly list alternatives or when not to use, but the context is adequate for an agent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_file_contentARead-only
Download the raw content of an uploaded file as text.
Bytes are decoded as UTF-8 with replacement for invalid sequences. Output
is truncated to `max_bytes` to avoid overwhelming the response.
Args:
file_id: ID of the uploaded file.
max_bytes: Maximum bytes to return (default 500 000).
Returns:
File text, with a truncation note appended when the content exceeds `max_bytes`.
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes | ||
| max_bytes | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses important behavioral traits beyond the readOnlyHint annotation: UTF-8 decoding with replacement, truncation to max_bytes, and a truncation note. This adds significant context for the agent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with clear sections for Args and Returns. Every sentence adds value with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description includes return format and truncation behavior. It covers all necessary aspects: parameters, encoding, truncation, and default behavior.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description compensates by explaining the purpose of 'max_bytes' (to avoid overwhelming response) and its default value. The 'file_id' description is minimal but adequate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool downloads raw content of an uploaded file as text. It uses a specific verb and resource, differentiating it from sibling tools like 'get_file' (presumably metadata) and 'upload_file'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when needing raw text content, but does not explicitly state when to use this tool over alternatives like 'get_file'. No exclusions or conditions are provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
grok_agentA
All-in-one Grok agent combining files, vision, web/X search, code execution, and image generation.
Enable any subset of tools and attach any mix of uploaded files and images.
The agent decides which tools to use per turn. Supports optional local
session history and multi-agent research via `agent_count`.
Args:
prompt: Task or question for the agent.
session: Optional session name for persistent history in `chats/{session}.json`.
model: Grok model driving the agent (default `grok-4.6`).
file_ids: IDs of previously uploaded files to attach as context.
image_urls: Public image URLs to attach.
image_paths: Local image files to attach (sent as base64 data URIs).
use_web_search: Enable the agentic web search tool.
use_x_search: Enable the agentic X (Twitter) search tool.
use_code_execution: Enable the Python code execution tool.
use_image_generation: Enable the server-side image generation tool, letting the agent
create and edit images mid-conversation. Images are saved under `images/`.
image_generation_action: Which image capabilities to expose: `"auto"` (default, generate
and edit), `"generate"` (text-to-image only), or `"edit"` (editing only).
allowed_domains: Web search allow-list (max 5, mutually exclusive with excluded).
excluded_domains: Web search deny-list (max 5).
allowed_x_handles: X search handle allow-list (max 10, mutually exclusive with excluded).
excluded_x_handles: X search handle deny-list (max 10).
from_date: X search inclusive start date as `DD-MM-YYYY`.
to_date: X search inclusive end date as `DD-MM-YYYY`.
enable_image_understanding: Let search tools analyze images they encounter.
enable_video_understanding: Let X search analyze videos in posts.
enable_image_search: Let web search find and return image results.
include_inline_citations: Embed `[1]`-style citation markers into the answer.
system_prompt: Optional system instruction prepended to the conversation.
max_turns: Cap the agent's reasoning/tool turns.
agent_count: 4 or 16. Only valid with `grok-4.20-multi-agent`.
service_tier: `"default"` or `"priority"`. Priority is processed faster at a higher token price.
show_usage: Append a token usage and cost footer to the answer (default False).
Returns:
Markdown with the answer body, then a `**Generated Images:**` list of saved file paths
when the agent produced images, then a `**Sources:**` list when citations exist.
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | grok-4.6 | |
| prompt | Yes | ||
| session | No | ||
| to_date | No | ||
| file_ids | No | ||
| from_date | No | ||
| max_turns | No | ||
| image_urls | No | ||
| show_usage | No | ||
| agent_count | No | ||
| image_paths | No | ||
| service_tier | No | ||
| use_x_search | No | ||
| system_prompt | No | ||
| use_web_search | No | ||
| allowed_domains | No | ||
| excluded_domains | No | ||
| allowed_x_handles | No | ||
| excluded_x_handles | No | ||
| use_code_execution | No | ||
| enable_image_search | No | ||
| use_image_generation | No | ||
| image_generation_action | No | ||
| include_inline_citations | No | ||
| enable_image_understanding | No | ||
| enable_video_understanding | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and discharges much of it: it discloses session persistence to chats/{session}.json, image output saved under images/, mutual-exclusivity and max-count constraints on domain/handle lists, the agent_count validity restriction, and that priority tier costs more. Auth requirements, rate limits, and cost magnitude remain unstated, so it falls short of a 5.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded one-line summary followed by a short behavioral note and a clearly structured Args/Returns block. It is long, but the 26-parameter surface justifies the length and the sectioning makes it scannable; only the middle paragraph is slightly loose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 26-parameter, no-annotation, no-output-schema tool this is thorough: it explains the tool's scope, how to configure each capability toggle, parameter constraints and formats, and explicitly describes the return payload (answer body, Generated Images list, Sources list). An agent has everything needed to call it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must carry all 26 parameters — and it does, documenting every one. It adds meaning the schema cannot: DD-MM-YYYY date formats, 'max 5' / 'max 10' limits, mutually-exclusive pairs, the three image_generation_action modes, service_tier values, and the 4-or-16 constraint on agent_count.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The opening line states a specific verb+resource combination: an all-in-one agent that bundles files, vision, web/X search, code execution and image generation. The 'all-in-one' framing implicitly separates it from single-capability siblings (web_search, x_search, chat_with_vision, generate_image), but it never names them or states the routing rule explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
'Enable any subset of tools and attach any mix of uploaded files and images. The agent decides which tools to use per turn' tells the agent how to configure the call but not when to choose this tool over the specialized siblings. No exclusions or alternative-naming is present, so usage is implied rather than stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_chat_sessionsARead-only
List all local chat sessions stored under chats/.
Returns:
Markdown list of session names with turn counts and last-message timestamps,
or a placeholder message when no sessions exist.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description adds value beyond the readOnlyHint annotation by detailing the output format (Markdown with session names, turn counts, timestamps) and behavior when no sessions exist (placeholder message).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, perfectly front-loaded with the verb ('List'), and no extraneous information. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite no output schema, the description fully explains the return format. For a simple parameterless tool with readOnlyHint, the description is complete and leaves no ambiguity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters exist in the schema. The baseline is 4 as schema description coverage is 100%. The description adds no parameter info, but none is needed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists all local chat sessions under 'chats/' and specifies the return format (Markdown list with turn counts and timestamps). It distinguishes from sibling tools that handle individual chat actions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use or alternatives is provided, but the tool's purpose is self-evident among siblings. It could mention that this is the only list-sessions tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_filesARead-only
List files previously uploaded to xAI.
Args:
limit: Maximum number of files to return (default 100).
order: `"asc"` or `"desc"` sort order (default `"desc"`).
sort_by: Field to sort by, such as `"created_at"`.
Returns:
Markdown list of files with ID, filename, and size, or a placeholder when empty.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| order | No | desc | |
| sort_by | No | created_at |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate readOnlyHint=true. The description adds behavior beyond annotations by specifying the return format (Markdown list with ID, filename, size, or placeholder) and default parameter values.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured, with separate Args and Returns sections. Every sentence adds value without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description is complete for a simple listing tool: it explains the action, parameters, and return format. No output schema is present, so the return description is essential and provided.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description fully compensates by explaining all three parameters: limit (max number, default 100), order (asc/desc, default desc), and sort_by (field, default created_at). This adds significant meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'List files previously uploaded to xAI,' which is a specific verb+resource. It distinguishes from siblings like get_file, delete_file, and upload_file by focusing on listing.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit when-to-use or when-not-to-use guidance is provided. The description is self-explanatory, but lacks alternatives or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_modelsARead-only
List all Grok language and image models with live pricing from the xAI API.
Returns:
Markdown sections for language models (input/output $/M tokens) and
image generation models ($/image), each with the model's release date.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotations already provide readOnlyHint=true, and the description adds the return format (Markdown sections with pricing and release dates). No side effects are mentioned, but none are expected. The description complements the annotations well.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two short sentences, front-loaded with the action and resource, and every sentence provides valuable information without any fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given zero parameters, no output schema, and a simple read-only operation, the description fully explains what the tool returns. It is complete for the agent to understand and invoke correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are no parameters in the input schema, so the description does not need to add parameter-level details. The baseline score of 4 applies as per guidelines for zero parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'List' and the resource 'all Grok language and image models' with additional context of live pricing. It distinguishes itself from sibling tools like chat, generate_image, and web_search, which have different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies that the tool is for retrieving model information, and the lack of parameters makes it straightforward. While it doesn't explicitly state when to use alternatives, the context is clear enough for an agent to decide.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
retrieve_stateful_responseARead-only
Fetch a stored chat completion from xAI by its response ID.
Args:
response_id: ID returned by a prior `stateful_chat` call.
Returns:
The stored assistant reply and its `**Response ID:**`, or a not-found message.
| Name | Required | Description | Default |
|---|---|---|---|
| response_id | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses return behavior (the reply and Response ID or a not-found message) which adds value beyond the readOnlyHint annotation. It does not cover rate limits or detailed error scenarios, but the annotation already ensures safe usage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very concise with two sentences and an Args bullet, front-loading the main purpose. Every sentence is necessary and no redundant information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple retrieval tool with one parameter and a readOnly annotation, the description covers the essential inputs and outputs. Minor gap: no mention of error handling for invalid IDs, but overall complete enough.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Although schema description coverage is 0%, the description's 'Args' section explains that 'response_id' is the ID from a prior 'stateful_chat' call, adding significant meaning beyond the schema's type and title.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states 'Fetch a stored chat completion' with a specific resource and identifier, clearly differentiating from siblings like 'stateful_chat' (creation) and 'delete_stateful_response' (deletion).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It specifies the prerequisite of a prior 'stateful_chat' call, providing clear context for use. However, it does not explicitly state when not to use or list alternatives, though the sibling names imply the distinctions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
stateful_chatA
Continue a server-side stored conversation using xAI's deferred/stateful chat.
The xAI API stores every turn so the client only needs to send the latest
prompt plus `previous_response_id`. Omit `response_id` to start a new thread.
Args:
prompt: User message to append.
model: Grok model id (default `grok-4.6`).
response_id: ID of the previous response to continue from (omit to start fresh).
system_prompt: Optional system instruction. Applied only on the first turn.
show_usage: Append a token usage and cost footer to the reply (default False).
Returns:
Assistant reply followed by the new `**Response ID:**` to pass back next turn.
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | grok-4.6 | |
| prompt | Yes | ||
| show_usage | No | ||
| response_id | No | ||
| system_prompt | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses important behavioral traits: server-side persistence, that only the latest prompt plus previous_response_id is needed, that system_prompt applies only on the first turn, and that the return includes a new Response ID. It does not cover error modes, permission/rate-limit behavior, or whether expired response IDs are rejected.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and front-loaded, with the core mechanism in the opening paragraphs followed by an Args/Returns block. Every sentence carries information, though the Args/Returns duplication of parameter semantics is slightly verbose for a tool with no output schema.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and no annotations, the description is complete enough for an agent to call the tool correctly: it explains the stateful flow, parameter meanings, defaults, the first-turn system_prompt constraint, and what the return contains (reply plus Response ID to pass back). Nothing essential for correct invocation is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate, and it does: it documents all five parameters with meaning and defaults (prompt, model default grok-4.6, response_id omission semantics, system_prompt first-turn-only constraint, show_usage footer behavior). This adds substantially beyond the bare schema titles/types.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (continue) and resource (server-side stored conversation via xAI's deferred/stateful chat). It is clearly distinguishable from the sibling 'chat' and 'retrieve_stateful_response' because it explains the previous_response_id continuation mechanism, which none of the siblings describe.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives explicit context for when to use it: to continue a stored conversation, sending only the latest prompt plus previous_response_id, and to omit response_id to start a new thread. It does not explicitly name the sibling alternatives (e.g., chat, retrieve_stateful_response) or state when not to use this tool, leaving a small gap.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
upload_fileA
Upload a local file to xAI so it can be attached to later chats.
Supported types include PDFs and text documents (see xAI file docs). The
returned file ID can be passed to `chat_with_files` or `grok_agent`.
Args:
file_path: Absolute or relative path to the local file.
expires_after: Optional TTL in seconds. The file is deleted from xAI
automatically once it expires (omit to keep the file indefinitely).
Returns:
Markdown block with the assigned file ID, filename, and size.
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| expires_after | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses behavioral traits such as automatic file deletion after a TTL and the ability to keep files indefinitely. It does not cover auth requirements or error handling, but the provided info is sufficient for basic usage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise: one introductory paragraph followed by clear bullet-style parameter descriptions. No redundant sentences; every piece of information serves a purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (2 params, no output schema), the description covers purpose, parameters, return value (Markdown block with file ID, filename, size), and integration with other tools. It lacks details on error scenarios or file size limits, but is largely complete for basic use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It does so thoroughly: file_path is described as 'Absolute or relative path to the local file,' and expires_after as 'Optional TTL in seconds. The file is deleted from xAI automatically once it expires (omit to keep the file indefinitely).' This adds essential meaning beyond the bare schema types.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Upload a local file to xAI so it can be attached to later chats.' It uses a specific verb ('upload') and resource ('local file to xAI'), and distinguishes it from sibling tools like get_file or chat_with_files.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description mentions supported file types (PDFs, text documents) and explains how the returned file ID is used with chat_with_files or grok_agent, providing context for when to use this tool. However, it doesn't explicitly state when not to use it or mention alternatives for different file handling.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
web_searchARead-only
Answer a query using agentic real-time web search.
Grok browses the web across multiple turns, optionally inspecting images on
pages, then synthesizes an answer with citations.
Args:
prompt: Search query or research question.
model: Grok model used to drive the agent (default `grok-4.6`).
allowed_domains: Restrict search to these domains (max 5, mutually exclusive with excluded).
excluded_domains: Exclude these domains from search (max 5).
enable_image_understanding: Let the agent analyze images it encounters.
enable_image_search: Let the agent search for and return image results.
include_inline_citations: Embed `[1]`-style citation markers into the answer text.
max_turns: Cap the agent's reasoning/tool turns.
show_usage: Append a token usage and cost footer to the answer (default False).
Returns:
Markdown with the answer body followed by a `**Sources:**` list of cited URLs.
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | grok-4.6 | |
| prompt | Yes | ||
| max_turns | No | ||
| show_usage | No | ||
| allowed_domains | No | ||
| excluded_domains | No | ||
| enable_image_search | No | ||
| include_inline_citations | No | ||
| enable_image_understanding | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations only declare readOnlyHint=true; the description goes well beyond that by disclosing the multi-turn agentic loop, optional image inspection/search, citation embedding, and the exact return shape (Markdown body plus a '**Sources:**' URL list). It adds real behavioral context, though it does not discuss latency, cost, or rate behavior beyond the show_usage footer.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The document is front-loaded with a one-line answer-in-itself summary, then a compact behavior paragraph, then an Args/Returns block where every line earns its place. Nothing is redundant despite covering 9 parameters.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description compensates by specifying the return format (Markdown answer plus Sources list), and it documents every input plus the agentic search behavior. An agent has everything needed to call this correctly without opening anything else.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% with 9 parameters, so the description carries the full burden and does so: it explains max-5 caps and mutual exclusivity for allowed/excluded_domains, the model default, what max_turns caps, and what enable_image_understanding/search and include_inline_citations actually do. This is meaningfully more than the bare parameter names.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The opening sentence gives a specific verb+resource ('Answer a query using agentic real-time web search') and the follow-up clarifies the mechanism (multi-turn browsing, image inspection, cited synthesis). It does not, however, name or contrast itself with the sibling x_search, so an agent must infer the boundary between web and X search.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage context is implied by the purpose statement – use it when you need a cited, web-grounded answer – but there is no explicit when-to-use/when-not guidance and no reference to alternatives like x_search or chat. The domain-restriction flags hint at scoping use cases, but selection guidance is left to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
x_searchARead-only
Answer a query using agentic search over X (Twitter).
Searches posts, threads, and users on X. Can filter by handle allow/deny
lists and a date range, and optionally analyze images/videos attached to posts.
Args:
prompt: Search query or question about X content.
model: Grok model driving the agent (default `grok-4.6`).
allowed_x_handles: Restrict search to these handles (max 10, mutually exclusive with excluded).
excluded_x_handles: Exclude these handles (max 10).
from_date: Inclusive start date as `DD-MM-YYYY`.
to_date: Inclusive end date as `DD-MM-YYYY`.
enable_image_understanding: Let the agent analyze images in posts.
enable_video_understanding: Let the agent analyze videos in posts (X Search only).
include_inline_citations: Embed `[1]`-style citation markers into the answer.
max_turns: Cap the agent's reasoning/tool turns.
show_usage: Append a token usage and cost footer to the answer (default False).
Returns:
Markdown with the answer body followed by a `**Sources:**` list of cited posts.
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | grok-4.6 | |
| prompt | Yes | ||
| to_date | No | ||
| from_date | No | ||
| max_turns | No | ||
| show_usage | No | ||
| allowed_x_handles | No | ||
| excluded_x_handles | No | ||
| include_inline_citations | No | ||
| enable_image_understanding | No | ||
| enable_video_understanding | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations provide readOnlyHint=true, so the safety profile is covered. The description adds useful behavioral context beyond that: it returns Markdown with a sources list, supports image/video understanding, inline citations, and a usage/cost footer. It does not discuss rate limits or auth, but goes well beyond the annotation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well-structured with a clear intro, Args list, and Returns section. The opening sentence is front-loaded and every entry earns its place. Slightly verbose compared to a terse alternative, but appropriate for eleven parameters.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Complete for a complex 11-parameter tool with no output schema: it explains what the agent searches, all filter options with constraints, optional media analysis, citation behavior, and the return format (Markdown + sources). Nothing an agent needs to call it correctly is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must carry the full burden. It documents every one of the 11 parameters with meaning, constraints (max 10 handles, mutual exclusivity, date format DD-MM-YYYY), and behavioral impact, fully compensating for the schema gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb+resource: 'Answer a query using agentic search over X (Twitter).' It clearly distinguishes itself from sibling web_search by scoping to X posts, threads, and users, and names the exact resource and behavior (agentic search, image/video analysis).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains what can be searched and filtered, implying when to use it (X content queries, filtered by handles/dates), but does not explicitly state when to choose this over web_search or grok_agent. No when-not or alternative guidance is given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
14 tool updates
v1.0.4- Changed
chat2 fields changed- changed
Input schema / properties / model / defaultPrevious value: -"grok-4.3"New value: +"grok-4.6" - added
Input schema / properties / service_tierAdded value: +{ + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Service Tier" +}
- Changed
chat_with_files1 field changed- changed
Input schema / properties / model / defaultPrevious value: -"grok-4.3"New value: +"grok-4.6"
- Added
chat_with_vision - Added
clear_chat_history - Added
code_executor - Added
generate_image - Added
generate_video - Added
get_chat_history - Added
grok_agent - Added
list_chat_sessions - Added
list_models - Added
stateful_chat - Added
web_search - Added
x_search
12 tool updates
- Removed
chat_with_vision - Removed
clear_chat_history - Removed
code_executor - Removed
generate_image - Removed
generate_video - Removed
get_chat_history - Removed
grok_agent - Removed
list_chat_sessions - Removed
list_models - Removed
stateful_chat - Removed
web_search - Removed
x_search
11 tool updates
v1.0.1- Changed
chat1 field changed- added
Input schema / properties / show_usageAdded value: +{ + "default": false, + "title": "Show Usage", + "type": "boolean" +}
- Changed
chat_with_files1 field changed- added
Input schema / properties / show_usageAdded value: +{ + "default": false, + "title": "Show Usage", + "type": "boolean" +}
- Changed
chat_with_vision1 field changed- added
Input schema / properties / show_usageAdded value: +{ + "default": false, + "title": "Show Usage", + "type": "boolean" +}
- Changed
code_executor1 field changed- added
Input schema / properties / show_usageAdded value: +{ + "default": false, + "title": "Show Usage", + "type": "boolean" +}
- Changed
extend_video1 field changed- added
Input schema / properties / show_usageAdded value: +{ + "default": false, + "title": "Show Usage", + "type": "boolean" +}
- Changed
generate_image1 field changed- added
Input schema / properties / show_usageAdded value: +{ + "default": false, + "title": "Show Usage", + "type": "boolean" +}
- Changed
generate_video1 field changed- added
Input schema / properties / show_usageAdded value: +{ + "default": false, + "title": "Show Usage", + "type": "boolean" +}
- Changed
grok_agent1 field changed- added
Input schema / properties / show_usageAdded value: +{ + "default": false, + "title": "Show Usage", + "type": "boolean" +}
- Changed
stateful_chat1 field changed- added
Input schema / properties / show_usageAdded value: +{ + "default": false, + "title": "Show Usage", + "type": "boolean" +}
- Changed
web_search1 field changed- added
Input schema / properties / show_usageAdded value: +{ + "default": false, + "title": "Show Usage", + "type": "boolean" +}
- Changed
x_search1 field changed- added
Input schema / properties / show_usageAdded value: +{ + "default": false, + "title": "Show Usage", + "type": "boolean" +}
4 tool updates
- Changed
generate_video2 fields changed- added
Input schema / properties / reference_image_pathsAdded value: +{ + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Reference Image Paths" +} - added
Input schema / properties / reference_image_urlsAdded value: +{ + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Reference Image Urls" +}
- Changed
grok_agent1 field changed- added
Input schema / properties / enable_image_searchAdded value: +{ + "default": false, + "title": "Enable Image Search", + "type": "boolean" +}
- Changed
upload_file1 field changed- added
Input schema / properties / expires_afterAdded value: +{ + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Expires After" +}
- Changed
web_search1 field changed- added
Input schema / properties / enable_image_searchAdded value: +{ + "default": false, + "title": "Enable Image Search", + "type": "boolean" +}
22 tool updates
- Added
chat - Added
chat_with_files - Added
chat_with_vision - Added
clear_chat_history - Added
code_executor - Added
delete_file - Added
delete_stateful_response - Added
extend_video - Added
generate_image - Added
generate_video - Added
get_chat_history - Added
get_file - Added
get_file_content - Added
grok_agent - Added
list_chat_sessions - Added
list_files - Added
list_models - Added
retrieve_stateful_response - Added
stateful_chat - Added
upload_file - Added
web_search - Added
x_search
22 tool updates
- Removed
chat - Removed
chat_with_files - Removed
chat_with_vision - Removed
clear_chat_history - Removed
code_executor - Removed
delete_file - Removed
delete_stateful_response - Removed
extend_video - Removed
generate_image - Removed
generate_video - Removed
get_chat_history - Removed
get_file - Removed
get_file_content - Removed
grok_agent - Removed
list_chat_sessions - Removed
list_files - Removed
list_models - Removed
retrieve_stateful_response - Removed
stateful_chat - Removed
upload_file - Removed
web_search - Removed
x_search
22 tool updates
- Added
chat - Added
chat_with_files - Added
chat_with_vision - Added
clear_chat_history - Added
code_executor - Added
delete_file - Added
delete_stateful_response - Added
extend_video - Added
generate_image - Added
generate_video - Added
get_chat_history - Added
get_file - Added
get_file_content - Added
grok_agent - Added
list_chat_sessions - Added
list_files - Added
list_models - Added
retrieve_stateful_response - Added
stateful_chat - Added
upload_file - Added
web_search - Added
x_search
22 tool updates
- Removed
chat - Removed
chat_with_files - Removed
chat_with_vision - Removed
clear_chat_history - Removed
code_executor - Removed
delete_file - Removed
delete_stateful_response - Removed
extend_video - Removed
generate_image - Removed
generate_video - Removed
get_chat_history - Removed
get_file - Removed
get_file_content - Removed
grok_agent - Removed
list_chat_sessions - Removed
list_files - Removed
list_models - Removed
retrieve_stateful_response - Removed
stateful_chat - Removed
upload_file - Removed
web_search - Removed
x_search
6 tool updates
- Changed
chat1 field changed- added
Input schema / properties / agent_countAdded value: +{ + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Agent Count" +}
- Changed
chat_with_files2 fields changed- removed
Input schema / properties / file_ids / defaultRemoved value: -null - changed
Input schema / requiredPrevious value: -[ - "prompt" -]New value: +[ + "prompt", + "file_ids" +]
- Added
extend_video - Changed
generate_image5 fields changed- removed
Input schema / properties / image_pathRemoved value: -{ - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Image Path" -} - added
Input schema / properties / image_pathsAdded value: +{ + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Image Paths" +} - removed
Input schema / properties / image_urlRemoved value: -{ - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Image Url" -} - added
Input schema / properties / image_urlsAdded value: +{ + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Image Urls" +} - added
Input schema / properties / resolutionAdded value: +{ + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Resolution" +}
- Changed
grok_agent1 field changed- added
Input schema / properties / agent_countAdded value: +{ + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Agent Count" +}
- Changed
upload_file1 field changed- removed
Input schema / properties / filenameRemoved value: -{ - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Filename" -}
21 tool updates
- Added
chat - Added
chat_with_files - Added
chat_with_vision - Added
clear_chat_history - Added
code_executor - Added
delete_file - Added
delete_stateful_response - Added
generate_image - Added
generate_video - Added
get_chat_history - Added
get_file - Added
get_file_content - Added
grok_agent - Added
list_chat_sessions - Added
list_files - Added
list_models - Added
retrieve_stateful_response - Added
stateful_chat - Added
upload_file - Added
web_search - Added
x_search
21 tool updates
- Removed
chat - Removed
chat_with_files - Removed
chat_with_vision - Removed
clear_chat_history - Removed
code_executor - Removed
delete_file - Removed
delete_stateful_response - Removed
generate_image - Removed
generate_video - Removed
get_chat_history - Removed
get_file - Removed
get_file_content - Removed
grok_agent - Removed
list_chat_sessions - Removed
list_files - Removed
list_models - Removed
retrieve_stateful_response - Removed
stateful_chat - Removed
upload_file - Removed
web_search - Removed
x_search
8 tool updates
- Changed
chat1 field changed- changed
Input schema / properties / model / defaultPrevious value: -"grok-4"New value: +"grok-4-1-fast-reasoning"
- Changed
chat_with_files1 field changed- changed
Input schema / properties / model / defaultPrevious value: -"grok-4-1-fast"New value: +"grok-4-1-fast-reasoning"
- Changed
chat_with_vision1 field changed- changed
Input schema / properties / model / defaultPrevious value: -"grok-4"New value: +"grok-4-1-fast-reasoning"
- Changed
code_executor1 field changed- changed
Input schema / properties / model / defaultPrevious value: -"grok-4-1-fast"New value: +"grok-4-1-fast-reasoning"
- Changed
grok_agent1 field changed- changed
Input schema / properties / model / defaultPrevious value: -"grok-4-1-fast"New value: +"grok-4-1-fast-reasoning"
- Changed
stateful_chat1 field changed- changed
Input schema / properties / model / defaultPrevious value: -"grok-4"New value: +"grok-4-1-fast-reasoning"
- Changed
web_search1 field changed- changed
Input schema / properties / model / defaultPrevious value: -"grok-4-1-fast"New value: +"grok-4-1-fast-reasoning"
- Changed
x_search1 field changed- changed
Input schema / properties / model / defaultPrevious value: -"grok-4-1-fast"New value: +"grok-4-1-fast-reasoning"
TDQS
Scored across 22 tools
Most tools are distinct, but `grok_agent` explicitly subsumes vision, files, web/X search, code execution, and image generation, overlapping heavily with `chat_with_vision`, `chat_with_files`, `web_search`, `x_search`, `code_executor`, and `generate_image`. `chat`, `stateful_chat`, and `chat_with_files` also have fuzzy boundaries between simple chat and agentic chat. Descriptions do help, but an agent could easily misselect.
The set is dominated by a clear verb_noun pattern (delete_file, get_file, generate_image, list_files, upload_file, web_search, extend_video). A few outliers (`chat`, `stateful_chat`, `grok_agent`, `code_executor`) are noun- or adjective-led, but overall the convention is readable and mostly predictable.
At 22 tools this sits at the heavy end, but the breadth (chat, stateful chat, files, vision, image, video, web/X search, code, models) genuinely justifies a large surface. The only redundancy is the all-in-one `grok_agent` duplicating several specialized tools, which could arguably be folded in.
File lifecycle is fully covered (upload, list, get metadata, get content, delete), chat and stateful-chat lifecycles are covered, and media generation includes image, video, and extend. Minor gaps remain (no listing of stateful responses, no video delete), but core workflows have no dead ends.
Maintenance
Related MCP Connectors
MCP server for Grok Imagine AI video generation
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
MCP server for building and testing AI agents with multi-model experimentation and insights.
AI video and image generation for any MCP client: Veo, Kling, Seedance, Grok via one OAuth login.
Related MCP Servers
- AlicenseAqualityFmaintenanceModel Context Protocol (MCP) server implementation that enables Claude Desktop to interact with Google's Gemini AI models.616 npm259MIT
- AlicenseAqualityAmaintenanceMCP server for generating and editing images using xAI's Grok image model, supporting text prompts, batch generation, local files, and optional proxy configurations.244 npm29MIT
- AlicenseAqualityFmaintenanceProduction-grade MCP server for image and video understanding and generation across Gemini, OpenAI, and Grok.5171 PyPI4Apache 2.0
- AlicenseNot gradedqualityBmaintenanceMCP server for xAI Grok API with 19 tools for chat, web and X search, session management, tool chaining, image and video generation, and documentation.2MIT