export_file
Export file attachments from REDCap record fields. Specify record ID and field name to get base64-encoded content, filename, and content type.
Instructions
Export a file attachment from a REDCap record field.
Args: record: Record ID containing the file. field: Name of the file upload field. event: Event name (longitudinal projects only). repeat_instance: Repeat instance number for repeating instruments/events.
Returns: JSON object with base64-encoded file content, filename, and content type.
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": {
"record": "<record>",
"field": "<field>"
},
"name": "export_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| event | No | ||
| field | Yes | ||
| record | Yes | ||
| repeat_instance | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |