Skip to main content
Glama

search_book

Read-only

Search a book’s prose to find matching chapters by exact phrase or meaning, returning snippets and character offsets so you can locate passages and follow up by reading the chapter.

Instructions

Search the PROSE of a book and get back the chapters that match, each with a snippet and the character offset of the hit. This is the only way to look inside the manuscript — search_knowledge searches entity RECORDS (names, descriptions), so it cannot answer 'where did I first describe the harbour?'. Two modes. 'text' is exact substring, case-insensitive, and works the same for CJK as for English — use it to find a word, name or phrase you know is there. 'semantic' finds passages that mean something similar without sharing wording, and only sees chapters whose embeddings exist. Follow a hit with get_chapter to read the full passage.

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": {
      "bookId": "<bookId>",
      "query": "<query>"
    },
    "name": "search_book"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeNo'text' (default) is exact substring; 'semantic' is meaning-based.
limitNoMaximum chapters to return. Server default 20, hard cap 50.
queryYesWhat to search for
bookIdYesBook ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.11.1

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the readOnly/openWorld annotations, it discloses return shape (matching chapters with snippet and character offset), matching semantics for text mode (exact substring, case-insensitive, CJK-equivalent), and a real limitation of semantic mode (only sees chapters whose embeddings exist). These are the behavioral facts an agent needs before choosing a mode.

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

Conciseness5/5

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

Front-loads the core purpose and the sibling differentiation, then mode guidance, then the next step. Every sentence carries information; no restatement of the name or title.

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?

No output schema exists, and the description compensates by describing the return value (chapters with snippet and offset). Combined with the mode guidance and the follow-up pointer to get_chapter, nothing essential for correct invocation is missing.

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?

Schema coverage is 100%, so the baseline would be 3; the description earns more by adding meaning the schema lacks, notably case-insensitivity and CJK behavior for 'text' and the embedding-coverage caveat for 'semantic'. It does not discuss limit/default behavior, which the schema already covers.

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?

States a specific verb and resource ('search the PROSE of a book') and explicitly contrasts itself with search_knowledge ('searches entity RECORDS'), including a concrete example query it alone can answer. An agent can distinguish it from the sibling without opening any schema.

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?

Gives explicit mode selection guidance: 'text' for a word, name or phrase you know is there; 'semantic' for meaning-based matches. It also names the alternative (search_knowledge) with the condition that rules it out, and prescribes the follow-up step (get_chapter) after a hit.

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