Skip to main content
Glama

moodle_download_file

Read-only

Download course or assignment files from Moodle file URLs. Returns a saved local path or file content depending on server type, letting AI assistants retrieve and process course materials.

Instructions

Download a course or assignment file from a Moodle file URL. A local server saves it to a temporary folder and returns its path; a hosted server returns the file's content.

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
urlYesA file url returned by another moodle_ tool.
siteNoSite key or URL. Optional when only one site is logged in.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

A3.8/5.0
Behavior4/5

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

Annotations only declare readOnlyHint and openWorldHint; the description adds genuinely useful behavior by explaining the divergent return semantics: a local server writes to a temp folder and returns a path, while a hosted server returns the file content. It omits auth requirements, file size limits, and whether the temp file persists, keeping it short of a 5.

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 tight sentences with no filler. The core action is front-loaded and the return-behavior clause follows immediately, so nothing is buried or 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?

With no output schema, the description carries the burden of explaining return values and does so well by covering both local-path and hosted-content outcomes. Remaining gaps are minor: no note on error behavior when the URL is invalid or the file is inaccessible.

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 coverage is 100%, so both url and site are already documented in the schema. The description adds only marginal meaning, reinforcing that the URL points at a Moodle file, and says nothing about the optional site parameter.

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

Purpose4/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 a course or assignment file from a Moodle file URL,' which tells an agent exactly what the tool produces. It does not, however, differentiate itself from the sibling moodle_read_file, leaving the agent to infer which of the two is appropriate.

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?

Usage is only implied by the input requirement of a file URL produced by another moodle_ tool (stated in the schema). There is no explicit when-to-use or when-not-to-use guidance, and no mention of the sibling moodle_read_file as an alternative.

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