read_file
Downloads a Moodle file and returns its text. For long PDFs, get a page map and request specific pages by number.
Instructions
Download a Moodle file (e.g. an assignment attachment or a file in a folder) and return its text.
Long PDFs return a page map first; call again with pages="12-14" for the pages you need.
Code and text files come back as-is. On the user's Mac the file is also saved locally (path in the output).
Args:
file_url: A moodle.epfl.ch .../pluginfile.php/... URL from open_item, search_in_files or read_discussion.
pages: For PDFs, which pages to read, e.g. "1-5", "2,4,10-12" or "all".
max_chars: Maximum characters of text to return; longer PDFs get a page map.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pages | No | ||
| file_url | Yes | ||
| max_chars | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |