Skip to main content
Glama

compare_books

Read-onlyIdempotent

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

NameRequiredDescriptionDefault
book_idsYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2026.9.0

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the read-only, open-world, idempotent annotations, the description discloses significant behavior: ranking order, added pct_positive and pct_critical metrics, duplicate-id handling, refusal above 10 ids, per-book error entries, partial results on HTTP 429 or 503, and retry guidance. This is unusually complete behavioral context for an agent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose and return behavior, then moves through constraints and failure modes in a logical order. It is somewhat lengthy in prose, but nearly every sentence adds operational value and there is little obvious filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity, the single-parameter schema, the existing output schema, and the annotations, the description covers what an agent needs: what is ranked, what metrics are returned, id constraints, duplicate handling, partial-failure behavior, and rate-limit behavior. It is complete enough to invoke and interpret the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides no description for book_ids, so the description must carry the parameter semantics. It explains that ids come from search_books or similar, that distinct ids are expected, that repeats are fetched once, that one id returns a single result, and that more than 10 is refused, though it does not specify the exact id format.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: compare several books side by side by rating and rating distribution. It clearly distinguishes this from sibling tools by explaining that it fetches multiple books and ranks them, rather than retrieving a single book or searching for books.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear usage context: pass up to 10 distinct book ids, typically from search_books, and split calls if more than 10 are needed. It stops short of explicitly naming alternatives such as get_book for a single book, though it notes that one id returns that book alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.