Read a File from Litewrite
litewrite_read_fileRead the content of a file directly from the Litewrite server, preferring the server copy over the local mirror. Supports optional line ranges for reading specific sections.
Instructions
Read the content of a file directly from the Litewrite server (POST /api/internal/files/read).
Prefers the server copy over the local mirror; use litewrite_local_read to read the local working copy instead.
Args:
projectId (string, required): The project id.
filePath (string, required): Path relative to the project root, e.g. "main.tex" or "chapters/intro.tex".
startLine / endLine (number, optional): Read only a line range.
Returns the file content as UTF-8 text.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| endLine | No | Last line to read | |
| filePath | Yes | Path relative to the project root | |
| projectId | Yes | The Litewrite project id | |
| startLine | No | First line to read |