download_file
Downloads a file from Salesforce using its ContentVersion or ContentDocument ID, saving it to a secure workspace. Returns file content for text formats or the saved path for binary files.
Instructions
Download a file from Salesforce. Accepts a ContentVersionId (068...) or ContentDocumentId (069...). Saves to a sandboxed workspace directory (default: ~/.local/share/salesforce-cloud-mcp/workspace/, configurable via SF_WORKSPACE_DIR). Text files (CSV, JSON, XML, TXT, etc.) also return content inline. Binary files return the saved path.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| contentId | Yes | ContentVersionId (068...) or ContentDocumentId (069...). Find these by querying ContentDocumentLink: SELECT ContentDocumentId FROM ContentDocumentLink WHERE LinkedEntityId = '<recordId>' |