Read a course file
read_fileDownloads a DTU Learn file and extracts its text from PDF, PowerPoint, Word, notebooks, code, or text, using course, assignment, submission, feedback, or link identifiers; returns paged text.
Instructions
Downloads a file from DTU Learn to the user's computer and returns its text (PDF, PowerPoint incl. speaker notes, Word, notebooks, code, text). Give either topic_id (course content), assignment_id + file_id (assignment attachment), assignment_id + submission_file_id (a file the user handed in), assignment_id + feedback_file_id (a file in the user's feedback, e.g. their hand-in with the teacher's comments), or url (a DTU Learn link to a file, as shown in module pages, descriptions and instructions, e.g. https://learn.inside.dtu.dk/content/enforced/...). Long files are paged: use offset to continue. The saved path is returned so a coding agent can also open the original.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"course": "<course>"
},
"name": "read_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | A DTU Learn link to a file, e.g. from a module page in get_course_outline. | |
| course | Yes | Course: a DTU course number (e.g. "02450"), part of the course name, or the Brightspace org unit id from list_courses. | |
| offset | No | Character offset to start from (default 0). | |
| file_id | No | fileId of the attachment from get_assignment. | |
| topic_id | No | topicId of a file from get_course_outline. | |
| max_chars | No | Maximum characters to return (default 40000). | |
| assignment_id | No | assignmentId, for an assignment attachment. | |
| feedback_file_id | No | feedbackFileId of a feedback file from get_assignment. | |
| submission_file_id | No | submissionFileId of a handed-in file from get_assignment. |