Read Lampa source file bytes
read_sourceRead contents of a specific repo file, core module, or template. Use start_line and end_line to fetch a targeted line range, avoiding full-file dumps beyond 300 lines.
Instructions
Read bytes from one known path: a repo file, a src/core module, or a src/templates template. Unlike search_code/find_files, this returns contents of a single target — do not dump catalogs (list_catalog). Full files truncate at max_lines (default 300); pass start_line+end_line (1-based, inclusive) for a range (ignores max_lines); kind=file requires file; omit file with kind=core/template to list; missing path → error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Repo-relative path, core module name (kind=core), or template name (kind=template). Required for kind=file. | |
| kind | No | file (default)=any path; core=src/core module; template=src/templates markup. | |
| end_line | No | Last line to read (inclusive). Pair with start_line. | |
| max_lines | No | Cap when reading a full file. Default 300. Ignored when start_line/end_line are set. | |
| start_line | No | First line to read (1-based). Pair with end_line. | |
| template_mode | No | For kind=template: list catalog, html markup, or raw JS. Default list when file omitted. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| markdown | Yes | Human-readable markdown report. Always present, including empty-result cases. Does not write files. |