Read file content
nextcloud_read_fileRead a file's contents from Nextcloud, including text, PDF, Word, Excel, PowerPoint, and images. Retrieve long content in chunks by offset and max characters for processing or inspection.
Instructions
Read what is in a file.
Text files (txt, md, csv, json, xml, code, …): the text.
PDF, Word (docx/odt), Excel (xlsx/ods) and PowerPoint (pptx/odp): the extracted text (PDF per page, spreadsheets per sheet as tab-separated rows; formatting and images are dropped, spreadsheet dates appear as numbers). Scanned PDFs without a text layer return little or nothing — use nextcloud_get_preview to look at them.
Images: the image itself (scaled down).
Long content comes in chunks of 'max_chars'; the result says which 'offset' to request next. Files above 10 MB are not read.
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": {
"path": "<path>"
},
"name": "nextcloud_read_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File path, relative to the user's Nextcloud root, e.g. '/Documents/Offers/offer-4711.pdf' | |
| offset | No | Character offset to start from, for reading long content in chunks. | |
| max_chars | No | Maximum characters to return in this call. |