Read a passage
read_passageRead up to 200 lines from a Project Gutenberg book by chapter or line number, with numbered lines for citation and paging.
Instructions
Read a Project Gutenberg book by chapter or by line number, up to 200 lines per call. Lines come back numbered so you can cite them, with next_start_line for paging. The license header and footer are already removed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Project Gutenberg book id, e.g. 2701 (Moby Dick) or 1342 (Pride and Prejudice). Find ids with search_books. | |
| chapter | No | Chapter index from get_book's chapter list. Reading starts at its heading. Use this or start_line, not both. | |
| max_lines | No | Lines to return (1-200, default 80). Blank lines count. When a chapter is given, reading stops at its end. | |
| start_line | No | 1-based line to start at (line numbers from get_book, find_in_book or a previous read_passage). Default 1. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| text | Yes | The passage, one book line per row, each prefixed with its line number (" 813 CHAPTER 1. Loomings."). | |
| title | No | ||
| chapter | No | Chapter containing start_line. | |
| end_line | Yes | ||
| start_line | Yes | ||
| attribution | Yes | Credit line to keep with any quoted text. | |
| total_lines | Yes | ||
| next_start_line | Yes | Pass as start_line to keep reading; null at the end of the book. | |
| chapter_end_line | No | Last line of the current chapter. |