Skip to main content
Glama

chat_with_files

Ask questions or give instructions about previously uploaded files to get context-aware responses from Grok.

Instructions

Chat with Grok using one or more previously uploaded files as context.

Args: prompt: Question or instruction about the attached files. file_ids: IDs returned by xai_upload_file. session: Optional session name for persistent local history. model: Grok model id (default grok-4.3). system_prompt: Optional system instruction prepended to the conversation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNogrok-4.3
promptYes
sessionNo
file_idsYes
system_promptNo

Output Schema

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

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

No annotations provided, so description must cover behavior. It describes the tool as chat with file context, but lacks details on side effects (none expected), prerequisites (files must be uploaded first), or potential errors. Adequate but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Docstring format with concise function line and parameter list. Efficient, though parameter descriptions could be integrated into the main description for brevity.

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

Completeness4/5

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

Covers purpose, parameters, and usage. With an output schema present, return values need not be explained. Lacks mention of prerequisites (file upload) and sibling differentiation, but overall adequate for a straightforward chat tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, but description explains all 5 parameters in detail: 'file_ids: IDs returned by xai_upload_file', 'session: Optional session name for persistent local history', etc. Adds significant value beyond schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the action ('Chat with Grok') and resource ('previously uploaded files as context'). Distinguishes from sibling tools like 'chat' (no files) and 'chat_with_vision' (vision input).

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

Usage Guidelines4/5

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

Implies use case: when you have uploaded files and want to query Grok about them. However, no explicit when-not-to-use or mention of alternatives like 'chat' for file-less conversations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/djtelicloud/grok-mcp-server'

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