Skip to main content
Glama

ReadingRate

Search book content

search_book_content
Read-onlyIdempotent

Searches the text of one book or one poem for passages about a topic, by meaning rather than exact words, and returns the passages with page and chapter (books) or the line and its neighbours (poems), plus a relevance score.

Use when the user asks to find a passage, a scene, or what a book or poem says about something, in a book or poem already identified by id (from search_books, get_reading_history or get_currently_reading). For the text around the page the reader has reached, without a topic, use get_passages_near_reading_position.

Book text is available only for books the reader uploaded their own copy of in the ReadingRate app; for other books the result says the text is not available. Poems are always searchable.

Spoiler protection is on by default for books: for a book on the reader's want-to-read list no passages are returned, and for a book they are reading only pages up to their logged position are searched. If no position is logged, the whole book is searched, unless spoiler_protection is set to true, in which case passages are withheld and the result says so. Finished books are searched in full. Set spoiler_protection to false to search the whole book.

Examples:

  • {"query": "marriage", "book_id": ""}

  • {"query": "the hunt", "poem_id": "whoso-list-to-hunt"}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of passages (default 5, max 10)
queryYesWhat to look for, in words, e.g. "passages about memory"
book_idNoThe book to search: its ReadingRate id or library entry id. Give this or poem_id.
poem_idNoThe poem to search: its anchor or slug, as for get_poem. Give this or book_id.
spoiler_protectionNoSearch only pages the reader has reached (default true). With no logged position, true withholds passages and the default searches the whole book. Not used for poems.

Output Schema

NameRequiredDescriptionDefault
queryYesThe search query that was run
messageNoPresent when no passages were found: explains why
passagesYesMatching passages ordered by relevance
results_countYesNumber of passages returned
filtered_to_bookNoPresent when book_id was provided: the resolved book
spoiler_protectionNoPresent when spoiler protection was applied or explicitly requested

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover safety (readOnlyHint, idempotent, non-destructive), and the description goes well beyond them with substantive behaviors: book text exists only for self-uploaded copies while poems are always searchable, and a detailed spoiler-protection policy keyed to want-to-read / currently-reading / finished status and logged position. Those are exactly the conditions an agent cannot infer from structured fields and that would otherwise cause wrong or empty calls.

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?

Purpose and return shape are front-loaded, then eligibility, then spoiler rules, then examples – a sensible escalation. It is longer than most definitions and the spoiler paragraph is dense and partly duplicates the schema, but every section carries actionable information rather than 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?

An output schema exists so return values need no prose, and the description still covers everything else that governs success: id sourcing, per-format eligibility, spoiler gating across reading states, and worked examples for both a book and a poem call. Nothing an agent needs to call it correctly is missing.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents query, book_id, poem_id, limit and spoiler_protection, including the default-with-no-position edge case. The description mostly restates this (the spoiler paragraph mirrors the spoiler_protection schema text) and adds only usage examples, so baseline 3 applies.

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?

Opens with a specific verb and resource ("Searches the text of one book or one poem") and adds the key differentiator, "by meaning rather than exact words." It also states what is returned (passages with page/chapter or line plus neighbours, plus relevance score), so the agent can separate it from search_books and search_poems without reading schemas.

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

Usage Guidelines5/5

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

Explicit trigger ("Use when the user asks to find a passage, a scene, or what a book or poem says about something") plus the prerequisite that the book/poem is already identified by id, naming where those ids come from (search_books, get_reading_history, get_currently_reading). It also names the sibling to use instead when there is no topic (get_passages_near_reading_position), covering the when-not case.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.