download_file
Download a course resource file to a local path using its paper ID and filename, with options to specify save location or use system temp directory.
Instructions
获取下载链接并自动下载文件内容,保存到本地磁盘。
- save_path 传文件绝对路径:按该路径保存,自动创建不存在的父目录。
- save_path 传已存在的目录:在目录下用原 filename 保存。
- save_path 不传:保存到系统临时目录,文件名会带原 filename 后缀。
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": {
"paper_id": "<paper_id>",
"filename": "<filename>"
},
"name": "download_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | 资源文件名(通过 query_course_resources 获取) | |
| paper_id | Yes | 资源文件的 paper_id(通过 query_course_resources 获取) | |
| save_path | No | 文件保存路径:文件绝对路径 / 已存在的目录(将用原文件名拼)/ 不填则存到系统临时目录 |