Skip to main content
Glama

download_file

Downloads a resource file by paper_id and filename, saving to a specified path or temporary directory.

Instructions

获取下载链接并自动下载文件内容,保存到本地磁盘。

- save_path 传文件绝对路径:按该路径保存,自动创建不存在的父目录。
- save_path 传已存在的目录:在目录下用原 filename 保存。
- save_path 不传:保存到系统临时目录,文件名会带原 filename 后缀。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paper_idYes资源文件的 paper_id(通过 query_course_resources 获取)
filenameYes资源文件名(通过 query_course_resources 获取)
save_pathNo文件保存路径:文件绝对路径 / 已存在的目录(将用原文件名拼)/ 不填则存到系统临时目录
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description clearly explains the behavior for save_path with three explicit cases: absolute path (auto-creates parent directories), existing directory (saves with original filename), and omitted (saves to system temp directory with original suffix). This is valuable behavioral information beyond the schema. However, it does not mention error handling, permissions, or what happens if the download fails.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise: a single introductory sentence followed by three bullet points, each covering a specific case. Every sentence is informative and earns its place. The structure is front-loaded with the purpose and then clarifies parameter behavior.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description does not explain the return value or success/failure indicators. It states the file is saved to disk but does not specify if there is a confirmation message or error feedback. This omission reduces completeness for an agent that needs to know what to expect after invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with all three parameters described. The description adds significant nuance for save_path by explaining three distinct behaviors. For paper_id and filename, it repeats the schema. Overall, the description adds meaning beyond the schema for the key parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: '获取下载链接并自动下载文件内容,保存到本地磁盘' which means 'get download link and automatically download file content, save to local disk'. It uses a specific verb (download) and resource (file), and is distinct from sibling tools that query resources or read file content.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites, such as needing a paper_id and filename from query_course_resources, but this is implicit. No explicit when-not-to-use or exclusion criteria are given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Sav1ouR520/xiaoya-teacher-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server