ntulearn_read_file_content
Read files attached to Blackboard course items inline to review or ask questions about lecture materials without downloading them. Handles PDFs, Office, and text files, with vision mode for diagrams.
Instructions
Read the content of files attached to a Blackboard content item, returned inline (no local-filesystem hop). Use this to ask questions about lecture material — ntulearn_download_file is for users who actually want the bytes on disk. PDFs default to text mode (via pypdf — cheap and almost always what you want for written content). Pass mode='vision' for diagram-, equation-, or screenshot-heavy pages; pair with pages='5' or pages='1-3' to keep the payload under MCP's 1 MB cap (~3K vision tokens per page). For multi-page diagram-heavy decks, prefer ntulearn_download_file plus drag-and-drop into claude.ai. Also supports Microsoft Office formats (.docx, .pptx with speaker notes, .xlsx with all sheets) and text-like files (txt, md, csv, json, xml, html with tags stripped, code files). Other binaries (images, video, audio, archives, legacy .doc/.ppt/.xls) are listed under skipped — fall back to ntulearn_download_file for those. Per-file cap 25 MB, batch cap 40 MB, vision cap 50 rendered pages; oversized files are skipped.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | PDF handling. 'text' (default) extracts text via pypdf — cheap, fits MCP's payload budget. 'vision' additionally renders each page as an image with PyMuPDF (~3K vision tokens per page); use for diagram/equation/handwritten content, ideally with a narrow `pages` range to stay under the 1 MB cap. Ignored for non-PDF files. | text |
| pages | No | Optional page range for PDFs (1-indexed, inclusive). Examples: '1-10', '3', '1,3,5', '1-5,8,10-12'. Omit to read all pages (vision mode capped at 50 rendered pages). Especially useful with mode='vision' to keep the response under MCP's 1 MB cap. | |
| course_id | Yes | Blackboard course ID (e.g. _12345_1) | |
| content_id | Yes | Content item ID (e.g. _67890_1) | |
| response_format | No | 'json' returns a structured payload (default, recommended for agents). 'markdown' returns a human-readable summary. | json |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| files | Yes | ||
| title | No | ||
| skipped | Yes | ||
| contentId | No | ||
| contentHandlerId | No |