get_file
Retrieve files from the Grok MCP server by providing a file ID to access stored documents, images, or media for processing.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes |
Implementation Reference
- src/server.py:559-564 (handler)The get_file tool handler which fetches file metadata from the XAI client.
async def get_file(file_id: str): client = Client(api_key=XAI_API_KEY) file_info = client.files.get(file_id) client.close() return f"**File ID:** `{file_info.id}`\n**Filename:** {file_info.filename}\n**Size:** {file_info.size} bytes\n**Created:** {file_info.created_at}"