compare_books
Compare up to 10 books by average rating and rating distribution to rank them and see how divisive each is.
Instructions
Compare several books side by side by rating and rating distribution.
Fetches each book and returns them ranked best-to-worst by average rating, with the ratings_histogram plus 'pct_positive' (share of 4-5 star) and 'pct_critical' (share of 1-2 star) so you can judge not just the average but how divisive each book is. Pass up to 10 distinct book ids (from search_books etc.); one id returns that book alone. A repeated id is fetched once. More than 10 is refused rather than silently trimmed, so split the call.
A book that fails (a bad id, a page Goodreads does not have) comes back as an 'error' entry and the rest are still fetched. If Goodreads asks to slow down (HTTP 429 or 503), the comparison stops there: the books already fetched are ranked as usual, the refused book keeps its 'error', and each book not yet asked for gets an 'error' saying it was not fetched. Wait before comparing those again.
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": {
"book_ids": "<book_ids>"
},
"name": "compare_books"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| book_ids | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||