Skip to main content
Glama

download_file

Downloads a CTFd challenge attachment to a local machine using a file URL or site-relative path, with an optional destination directory.

Instructions

Download a challenge attachment to the local machine.

Challenge detail (challenge tool) returns a files array with site-relative paths like /files/<hash>/<name> (signed URLs on some deployments). Pass one of those values here.

Args: file_url: absolute http(s) URL or site-relative path to the file. dest_dir: optional local directory to store the file in (default: CTFD_DOWNLOAD_DIR or ./downloads).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dest_dirNo
file_urlYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.4

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses accepted URL forms (absolute http(s) or site-relative like /files/<hash>/<name>, sometimes signed) and the dest_dir default resolution, but says nothing about authentication requirements, whether existing files are overwritten, or side effects on disk.

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

Conciseness4/5

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

Purpose is front-loaded in the first sentence, followed by a targeted pointer to the source of the input and a compact Args block. Every line earns its place, though the Args block partly restates schema fields.

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?

An output schema exists, so return values need not be explained. The description covers the workflow link, both parameters, and the default directory, leaving only auth and overwrite behavior unstated for a simple two-parameter download tool.

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 0%, so the description must compensate, and it does for both parameters: file_url's accepted formats and dest_dir's optionality plus the CTFD_DOWNLOAD_DIR/./downloads default, which the schema only shows as null. It stops short of path/filename collision or directory-creation semantics.

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?

States a specific verb and resource (download a challenge attachment to the local machine) and ties it to the sibling 'challenge' tool that produces the input. An agent can distinguish it immediately from challenge, challenges, or instance_info.

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?

Explicitly routes the agent: get the files array from the 'challenge' tool, then pass one of those values here. It gives the condition that supplies the input, though it never states when this tool should not be used (e.g., non-challenge URLs).

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