Add a book to the library
add_book_to_libraryAdds one book to the reader's ReadingRate library. It goes on the want-to-read list unless a status is given: "reading" for a book they are reading now, "read" for one they have finished (with an optional rating and finish date), or "stopped".
Use when the user asks to add a book to their library or reading list, or says they are reading or have finished a book that is not in their library yet. Identify the book with exactly one of book_id, isbn or title_author.
A book already in the library is left where it is, and the result says which shelf it is on; to move it, use update_book_status. A book added as read also goes on the reader's ReadingRate activity feed; other readers see that they finished it while the reader's profile is public and shows finished books (new accounts start private, and finished books start hidden). A book given by title and author that is not in the ReadingRate catalog is looked up in Google Books and added to the catalog, which is public, and ReadingRate then analyzes it; so add a book named by title only once the reader has confirmed the title.
Examples:
{"title_author": {"title": "The Great Gatsby", "author": "F. Scott Fitzgerald"}}
{"isbn": "9780140449136", "status": "read", "rating": 5}
{"book_id": "", "status": "reading"}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| isbn | No | ISBN-10 or ISBN-13 | |
| rating | No | Rating from 1 to 5, for a book added as read | |
| status | No | The shelf to put the book on instead of want-to-read | |
| book_id | No | The book's ReadingRate id, from another ReadingRate tool's results | |
| title_author | No | The book's title and author. Close spellings match. | |
| date_finished | No | Finish date, YYYY-MM-DD, for a book added as read (default: today) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| book | No | The book | |
| rating | No | The rating recorded, when the book went in as read | |
| message | Yes | Human-readable result | |
| success | Yes | True when the book was added; false when it was already in the library | |
| tbr_count | No | Want-to-read list size after adding | |
| new_status | No | The shelf the book went on, when a status was given | |
| date_started | No | Start date, when the book went in as reading | |
| date_finished | No | Finish date, when the book went in as read | |
| existing_status | No | The shelf the book was already on, when it was already in the library | |
| is_new_catalog_entry | No | True when the book was not in the catalog and was added to it | |
| status_change_failed | No | The book was added but the status asked for did not take | |
| reading_time_estimate | No | Estimated reading time at an average pace |