downloadFile
Download file attachments from RSpace documents to your local system by specifying the file ID and destination path. Retrieve images, data files, and other attachments stored in RSpace research documents.
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-649 (handler)The handler function decorated with @mcp.tool(name="downloadFile"). Downloads the specified file attachment from RSpace using eln_cli and saves it to the provided local path.@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
- main.py:633-633 (registration)MCP tool registration decorator specifying the tool name as 'downloadFile' with 'rspace' tag.@mcp.tool(tags={"rspace"}, name="downloadFile")
- main.py:634-637 (schema)Type annotations defining the input schema (file_id: int, file_path: str) and output (Dict[str, any]).def download_file( file_id: int, file_path: str ) -> Dict[str, any]: