Skip to main content
Glama

robotbase-content

Cyberlibrary Search Passages

cyberlibrary_search_passages
Read-onlyIdempotent

Ranked passage retrieval over the paragraph index (BM25). Use a natural-language or keyword query to find the most relevant passages across books, with the book, chapter, chunk_id, citation, license and source URL for each hit. When to use: you need evidence passages for a question rather than a literal phrase match. Do not use: to verify an exact quotation (cyberlibrary_verify_quote) or to read a whole book (cyberlibrary_get_chunks). Pass lang when known (faster/more precise). Returns: {query, matched, candidates, corpus_version, results[{chunk_id, score, lang, slug, title, chapter, para, citation, url, license, snippet}]}. Note: BM25 lexical ranking; a neural semantic layer is planned.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
langNoOptional language filter, e.g. zh-cn, en.
slugNoOptional book slug to restrict the search.
limitNoMax passages (1-20). Default 10.
queryYesNatural-language or keyword query (2-120 chars).
snippet_charsNoSnippet length (100-1000). Default 300.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly/openWorld/idempotent and non-destructive behavior, so the safety profile is covered. The description goes further by disclosing the ranking model (BM25 lexical), the performance tradeoff of passing lang, and the planned neural layer, which is genuinely useful context. It does not discuss result limits or failure modes, keeping it short of a 5.

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?

Front-loaded with purpose, then when/not-to-use, then parameters, then return shape. The embedded return-schema listing is verbose, but since there is no output schema it earns much of its space; still, it is the longest portion of an otherwise tight definition.

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?

With no output schema, the description fully specifies the return object and its result fields, and the absence of structured output is compensated for. Combined with the usage routing and ranking note, an agent has everything needed to invoke it 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?

Schema coverage is 100%, so the baseline is 3, but the description adds meaning beyond the schema by advising 'Pass lang when known (faster/more precise)' and framing query as natural-language or keyword. It does not clarify slug/snippet_chars beyond what the schema states.

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 ('Ranked passage retrieval over the paragraph index (BM25)') and immediately scopes the input mode ('natural-language or keyword query'). It clearly distinguishes itself from the many library siblings by naming the retrieval mechanism and the paragraph-index target.

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 'When to use' and 'Do not use' clauses, with named alternatives: cyberlibrary_verify_quote for exact quotations and cyberlibrary_get_chunks for whole-book reading. This routes the agent correctly among close siblings with no inference required.

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.