Read a MEGA text or PDF file
mega_read_fileDownload and return text contents of a file from MEGA. PDFs are automatically extracted to text; binary files are rejected.
Instructions
Download and return the text contents of a file. PDFs are extracted to text automatically. Provide either a path within a folder link, or a direct file link. Other binary files are rejected. Text reads are capped at MEGA_MAX_READ_BYTES; PDFs at MEGA_MAX_PDF_BYTES.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "mega_read_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | File path within the folder link, e.g. 'notes/todo.md'. | |
| link | No | MEGA link: a folder link (with `path`) or a direct file link. | |
| maxBytes | No | Override max bytes to read (default 2000000). |