Skip to main content
Glama

download_file

Fetch remote files from HTTP/HTTPS URLs, with support for custom methods, headers, and bodies, and save them securely to the sandbox.

Instructions

DOWNLOAD FILES from the internet using HTTP/HTTPS protocols. Supports GET, POST, and other HTTP methods with custom headers and request body. Downloaded files are automatically saved to the sandbox directory. Use this tool when you need to: 1) Download files from URLs, 2) Fetch remote resources, 3) Download data files, images, documents, 4) Make HTTP requests with custom parameters, 5) Download API responses. All files are stored securely in the sandbox. Keywords: download, fetch, get file, http download, retrieve file, save from url, download from internet. / 从互联网下载文件,使用HTTP/HTTPS协议。支持GET、POST等HTTP方法,支持自定义请求头和请求体。下载的文件自动保存到沙箱目录。用于:1) 从URL下载文件,2) 获取远程资源,3) 下载数据文件、图片、文档,4) 使用自定义参数发起HTTP请求,5) 下载API响应。所有文件安全存储在沙箱中。关键词:下载、获取文件、HTTP下载、从URL保存。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to download from. Must be a valid HTTP or HTTPS URL. Examples: 'https://example.com/api/report.pdf', 'http://cdn.example.com/data/users.json', 'https://raw.githubusercontent.com/user/repo/main/README.md'.
bodyNoOptional request body for POST, PUT, or PATCH requests. Can be JSON, form data, or any text content. For JSON data, make sure to set Content-Type header to 'application/json'. Examples: '{"key": "value"}', 'param1=value1&param2=value2'.
pathYesThe file path where the downloaded content will be saved (relative to sandbox directory). Parent directories will be created automatically if they don't exist. The filename can be different from the URL. Examples: 'downloads/my-report.pdf', 'data/user-list.json', 'docs/readme.txt'.
methodNoHTTP method to use for the request. Common methods: GET (default, for simple downloads), POST (for form submissions or API calls), PUT, DELETE, HEAD. If not specified, defaults to GET.GET
headersNoOptional HTTP headers to include in the request. Useful for authentication, content type specification, or custom headers. Format: key-value pairs. Examples: {'Authorization': 'Bearer token123', 'Content-Type': 'application/json', 'User-Agent': 'MyApp/1.0'}.
timeoutNoRequest timeout in seconds. If the download takes longer than this, it will be cancelled. Default is 30 seconds. Increase for large files or slow connections.
skip_tls_verifyNoSkip TLS certificate verification for HTTPS requests. WARNING: This is insecure and should only be used in development environments with self-signed certificates. Never use in production. Default is false (verify certificates).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeYes
messageYes
successYes
content_typeYes
sandbox_pathYes
absolute_pathYes
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses that downloaded files are automatically saved to the sandbox directory and stored securely, and it mentions support for HTTP methods and custom headers/body. However, it does not disclose return format, error handling, or overwrite behavior.

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

Conciseness2/5

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

The description is overly verbose, containing a redundant use-case list, a keyword list, and a full Chinese translation. It is front-loaded but includes repeated information (e.g., download from internet, saved to sandbox) that does not earn its place. A more concise version would be more effective.

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

Completeness4/5

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

The tool is moderately complex with 7 parameters and an output schema. The description covers core functionality, use cases, storage location, and supported HTTP methods. It does not explain return values, but the presence of an output schema reduces the need for that. Minor gaps like error behavior could be added, but overall it is adequate.

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

Parameters3/5

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

The input schema covers 100% of parameters with detailed descriptions, including URL, path, method, headers, body, timeout, and skip_tls_verify. The tool description only adds that custom headers and request body are supported, which is already evident from the schema. Baseline 3 applies.

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 function with a specific verb and resource: 'DOWNLOAD FILES from the internet using HTTP/HTTPS protocols.' It further enumerates specific use cases (downloading files, fetching remote resources, making HTTP requests), which helps distinguish it from local file operation tools like copy_file, move_file, and read_file.

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

Usage Guidelines4/5

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

The description explicitly says 'Use this tool when you need to:' followed by a list of five concrete scenarios. This provides clear context for when to use the tool, though it does not mention alternatives or when not to use it.

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/shibingli/mcp-toolkit'

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