ntulearn_download_file
Download all files attached to a Blackboard course content item to local disk, including attachment files and linked documents, with an optional target folder.
Instructions
Download every file attached to a Blackboard content item to local disk. Handles both resource/x-bb-file (attachment API) and resource/x-bb-document (HTML body with bbcswebdav links) handler types. Pass destination_dir to target a specific folder — useful for organising a semester (e.g. destination_dir='~/NTU/y3s1/sc2002/week 8/'). Returns saved files with their resolved local paths and sizes. Use ntulearn_read_file_content if you want to inspect the content inline rather than saving to disk.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| course_id | Yes | Blackboard course ID (e.g. _12345_1) | |
| content_id | Yes | Content item ID (e.g. _67890_1) | |
| destination_dir | No | Optional target directory. Accepts absolute paths and `~`-prefixed paths (e.g. '~/NTU/y3s1/sc2002/week 8/'). Created if missing. Defaults to NTULEARN_DOWNLOAD_DIR env var, or ./downloads/ if unset. | |
| response_format | No | 'json' returns a structured payload (default, recommended for agents). 'markdown' returns a human-readable summary. | json |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| files | Yes | ||
| title | No | ||
| contentId | No | ||
| destinationDir | No | ||
| contentHandlerId | No |