insync_download_document
Downloads a patient portal document by folder URL and file name, saving it locally or returning it inline or as a signed link on hosted servers.
Instructions
Download a document filed to the patient’s portal account. Identify it by the folder_url and file_name from insync_list_documents (full view). On a local install the file is saved to disk and the path returned; on a hosted server it comes back inline (up to 10 MiB), or as a short-lived signed download link when larger. The download goes through the portal — never direct storage.
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": {
"folder_url": "<folder_url>",
"file_name": "<file_name>"
},
"name": "insync_download_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_name | Yes | The document’s FileName from insync_list_documents (full view). | |
| folder_url | Yes | The document’s DstFolderURL from insync_list_documents (full view). | |
| output_dir | No | Directory to save into (local install only; ignored on a hosted server, which returns the file inline or as a link). Defaults to INSYNC_OUTPUT_DIR or ~/Downloads; must resolve inside an allowed root. |