moodle_read_file
Retrieve and read the text of course files from ZHAW Moodle (PDF, PPTX, DOCX, HTML, TXT) to summarize or explain lecture materials. Supports page ranges and partial reads for long documents.
Instructions
Read the text of a course file (PDF, PowerPoint .pptx, Word .docx, HTML, text).
Downloads the file first if needed. Use this to summarise or explain lecture slides,
scripts and exercise sheets. Long files come in parts: continue with next_pages.
Args:
resource_id: id of a single file from moodle_list_resources, moodle_search or
moodle_get_content (folder files: "<folder id>/<path>")
pages: page/slide range for PDF and PowerPoint, e.g. "1-10", "5" or "11-"
max_chars: maximum characters to return (1000-100000)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pages | No | ||
| max_chars | No | ||
| resource_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| path | Yes | Local file the text was read from | |
| text | Yes | Extracted text; pages/slides are marked '--- Seite N ---' / '--- Folie N ---' | |
| pages | No | Range contained in text, e.g. '1-12' | |
| file_type | Yes | pdf, powerpoint, word, html or text | |
| truncated | No | ||
| next_pages | No | Pass as `pages` to continue reading | |
| resource_id | Yes | ||
| total_pages | No | Pages (PDF) or slides (PowerPoint) |