Skip to main content
Glama
Moodle MCP Server
by d1zcipline

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

NameRequiredDescriptionDefault
urlYesfileurl from moodle_list_files or moodle_assignment
subdirNoSubfolder inside moodle-data/downloads
filenameNoOverride the filename (default: from the URL)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It usefully discloses that a local file is written to a specific folder and that a path is returned, but it omits overwrite semantics, whether the subfolder is created, size or rate limits, and error behavior for invalid URLs.

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?

Two short sentences with the destination and return value front-loaded, followed by the input source. No filler and nothing redundant.

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?

For a three-parameter download tool with no output schema, the description covers the destination and the return value, which is what an agent primarily needs. It falls slightly short on overwrite/collision and subfolder-creation behavior for a tool whose whole job is writing to disk.

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?

Schema description coverage is 100%, so all three parameters (url, subdir, filename) are already documented with their defaults. The description only reiterates the URL source, adding no new semantics such as path constraints or behavior for the filename override.

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 states a specific verb and resource ('Download one file'), the exact destination ('local moodle-data/downloads folder'), and the return value ('return its path'). This is precise enough that an agent can distinguish it from the list/read siblings such as moodle_list_files without inspecting the schema.

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

Usage Guidelines3/5

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

It states where the input URL should come from ('a fileurl from moodle_list_files or an assignment attachment'), which implies the workflow context. However, it gives no when-to-use vs when-not guidance, no prerequisites, and no mention of what happens if the file already exists locally.

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