Skip to main content
Glama

ntulearn_download_file

Download all files attached to a Blackboard course content item to local disk, including attachment files and linked documents, with an optional target folder.

Instructions

Download every file attached to a Blackboard content item to local disk. Handles both resource/x-bb-file (attachment API) and resource/x-bb-document (HTML body with bbcswebdav links) handler types. Pass destination_dir to target a specific folder — useful for organising a semester (e.g. destination_dir='~/NTU/y3s1/sc2002/week 8/'). Returns saved files with their resolved local paths and sizes. Use ntulearn_read_file_content if you want to inspect the content inline rather than saving to disk.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
course_idYesBlackboard course ID (e.g. _12345_1)
content_idYesContent item ID (e.g. _67890_1)
destination_dirNoOptional target directory. Accepts absolute paths and `~`-prefixed paths (e.g. '~/NTU/y3s1/sc2002/week 8/'). Created if missing. Defaults to NTULEARN_DOWNLOAD_DIR env var, or ./downloads/ if unset.
response_formatNo'json' returns a structured payload (default, recommended for agents). 'markdown' returns a human-readable summary.json

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNo
filesYes
titleNo
contentIdNo
destinationDirNo
contentHandlerIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

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, openWorldHint=true, idempotentHint=false and destructiveHint=false, so the safety profile is covered. The description adds practical side-effect context: it handles two Blackboard handler types, creates the destination directory if missing, and returns resolved local paths with sizes. It stops short of describing overwrite behavior or per-file failure handling, so it is strong but not exhaustive.

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 core action and keeps each sentence purposeful: handler coverage, destination_dir guidance, return summary, and sibling routing. It is slightly longer than strictly necessary because the destination_dir sentence largely repeats the schema description, but no sentence is wasted.

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 output schema already documents return structure and annotations cover the mutation/open-world profile, the description supplies the remaining decision context: handler types handled, destination behavior, and the inline alternative. It is nearly complete, with only minor gaps like overwrite semantics and error behavior.

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 all four parameters are already documented in the input schema, including the destination_dir default and the response_format enum. The description restates destination_dir's purpose and example but adds no syntax or constraint detail beyond what the schema provides, so baseline 3 applies.

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 (download), resource (every file attached to a Blackboard content item) and destination (local disk). It also distinguishes the tool from ntulearn_read_file_content by naming the inline-inspection alternative, so an agent can tell them apart without opening both schemas.

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

Usage Guidelines5/5

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

Explicitly names the alternative sibling (ntulearn_read_file_content) and the condition that selects it ('inspect the content inline rather than saving to disk'). It also gives a concrete scenario for using destination_dir, leaving no ambiguity about when to use this tool versus its sibling.

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