downloadFile
Download file attachments from RSpace documents to your local system. Retrieve images, data files, or other attachments by specifying the file ID and save location.
Instructions
Downloads file attachments from RSpace documents
Usage: Retrieve images, data files, or other attachments Parameters:
file_id: Numeric ID of the file attachment
file_path: Local filesystem path where file should be saved
Returns: Download status and file information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes | ||
| file_path | Yes |
Implementation Reference
- main.py:633-650 (handler)The primary handler function for the 'downloadFile' MCP tool. It is decorated with @mcp.tool to register it and implements the core logic by calling the RSpace ELN client's download_file method to save the specified file attachment to the local filesystem.@mcp.tool(tags={"rspace"}, name="downloadFile") def download_file( file_id: int, file_path: str ) -> Dict[str, any]: """ Downloads file attachments from RSpace documents Usage: Retrieve images, data files, or other attachments Parameters: - file_id: Numeric ID of the file attachment - file_path: Local filesystem path where file should be saved Returns: Download status and file information """ resp = eln_cli.download_file(file_id=file_id, filename=file_path, chunk_size=1024) return resp