upload_file
Upload local files like PDFs and text documents to xAI for attachment in chats. Get a file ID to use with chat tools for file-based interactions.
Instructions
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.
Returns:
Markdown block with the assigned file ID, filename, and size.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes |