moodle_download_file
Downloads a Moodle file from a provided URL into the local downloads folder and returns its path. Use it to save course files or assignment attachments for local access.
Instructions
Download one file into the local moodle-data/downloads folder and return its path. Takes a fileurl from moodle_list_files or an assignment attachment.
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": {
"url": "<url>"
},
"name": "moodle_download_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | fileurl from moodle_list_files or moodle_assignment | |
| subdir | No | Subfolder inside moodle-data/downloads | |
| filename | No | Override the filename (default: from the URL) |