Skip to main content
Glama

moodle_download_file

Download a Moodle submission or assignment attachment to a local directory and get its saved file path. Existing files are preserved by appending a numbered suffix.

Instructions

Downloads a submission file (or an assignment attachment) to the local disk and returns its path. fileUrl is the url field from moodle_get_submission or moodle_list_assignments. An existing file is not overwritten: " (1)" is appended to the name.

Input Schema

NameRequiredDescriptionDefault
destDirYesAbsolute path of the directory to save to; created if missing
fileUrlYesMoodle file URL (…/pluginfile.php/…) on this site

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, openWorldHint=true, and destructiveHint=false, so the safety profile is largely covered. The description adds genuinely new behavior: an existing file is not overwritten and a "(1)" suffix is appended, which also explains the non-idempotent hint. Auth/site prerequisites are not mentioned, but nothing contradicts the annotations.

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?

Front-loaded with the action and return value, then the input provenance, then the overwrite caveat — each sentence earns its place. Slightly compressed/awkward in the final clause (the quote around "(1)"), but no wasted content.

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 two-parameter side-effecting download with no output schema, the description covers the return value, the required input's source, and the collision behavior. Only minor gaps remain: no mention of permissions or failure modes when the URL is unreachable.

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 100%, so the baseline is 3, and the description goes beyond it by identifying fileUrl's provenance (the url field from the listing/submission tools). destDir's create-if-missing behavior is already in the schema, so the description adds value on one parameter only.

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 (downloads a submission file / assignment attachment to local disk) and names the return value (its path). It also references the sibling tools that produce the required input, so an agent can place it precisely against moodle_get_submission and moodle_list_assignments.

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 tells the agent where fileUrl comes from — the url field of moodle_get_submission or moodle_list_assignments — which is real routing guidance rather than implied usage. It stops short of stating when NOT to use it or any prerequisite/ordering constraints.

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