Skip to main content
Glama
Dathis

ZHAW Moodle MCP Server

by Dathis

moodle_download_resource

Idempotent

Download learning materials from Moodle—individual files, folders, or files linked in pages—to a chosen directory and receive the local file paths.

Instructions

Download a file, all files of a folder, or files linked in a page/text block, and return the local paths.

    By default files go to the managed directory <download_directory>/<course>/<section>/,
    which moodle_sync_course also uses.

    Args:
        resource_id: id from moodle_list_resources ("<cmid>" or "<folder cmid>/<path>"),
            or a file link's resource_id from moodle_get_content ("<page/label id>/<file>");
            the id of a page or text block downloads all files linked in it
        destination: optional target directory; relative paths are resolved
            against the configured download directory
        overwrite: replace an existing local file (otherwise it is left as is)
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
overwriteNo
destinationNo
resource_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesYes
failedNoLinked files that could not be loaded
resource_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.3/5.0
Behavior4/5

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

The description adds valuable behavioral details beyond the annotations: it explains the default destination path, the overwrite behavior ('replace an existing local file (otherwise it is left as is)'), and that it returns local paths. It also clarifies the resource_id format. The annotations already indicate non-read-only (readOnlyHint=false) and non-destructive (destructiveHint=false), and the description aligns without contradiction. It doesn't discuss permissions or error handling, but the core behaviors are transparent.

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 well-structured with a clear first sentence stating the purpose, followed by a brief note on default behavior, then a concise Args section. It front-loads the key information and avoids redundancy. Every sentence earns its place, and the format is easy to scan.

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?

Given the tool's moderate complexity (3 parameters, one required) and the presence of an output schema (which likely documents return values), the description covers the essential operational details: input sources, default destination, overwrite behavior, and parameter formats. It does not cover error conditions or prerequisites (like authentication), but those may be handled by sibling tools or the output schema. Overall, it is sufficiently complete for an agent to invoke it correctly.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate. The Args section thoroughly explains each parameter: resource_id (with specific formats from other tools), destination (optional, relative paths resolved against the configured download directory), and overwrite (boolean behavior). This goes far beyond the bare schema, providing essential meaning and context for correct usage.

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 precise action: 'Download a file, all files of a folder, or files linked in a page/text block, and return the local paths.' It names the resource types and the output, and it clearly distinguishes from sibling tools like moodle_get_content (which likely retrieves content without downloading) and moodle_sync_course (which is a broader sync operation). This is specific and unambiguous.

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?

The description provides contextual guidance by specifying where resource_ids come from ('id from moodle_list_resources...' or 'file link's resource_id from moodle_get_content') and notes that moodle_sync_course uses the same download directory. However, it does not explicitly state when to use this tool over alternatives (e.g., 'use this instead of moodle_get_content when you need local files') or provide exclusion criteria. The usage is implied but not fully spelled out.

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