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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"contentId": "<contentId>"
},
"name": "download_file"
}
}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>' |