read_document
Extract text from a Moodle file by its ID, reading the local mirror or downloading it. For PDFs, select specific pages; media files return metadata instead.
Instructions
Extract the text of one file, by its file_id.
Reads the local copy when the mirror has it, and downloads through the
Moodle token otherwise. pages selects PDF pages, for example 1-5 or 3.
Media files return their metadata and no text: a video is not summarised
here.
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": {
"file_id": "<file_id>"
},
"name": "read_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pages | No | ||
| file_id | Yes | ||
| max_chars | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |