Skip to main content
Glama
books-as-data
by kintopp

sgbr_search

sgbr_search
Read-onlyIdempotent

Search over one million digitized books by relevance across full text and catalogue metadata, then narrow results by year, language, library, genre, and object type to find relevant records.

Instructions

Read sgbr_guide before your first search. Search records by relevance across full text and catalogue metadata. Each hit returns title, author, date, place, language, type, availability, and an id to pass to sgbr_get_record. Narrow with filters (library, language, genre, object_type/foldouts, …), a year_from/year_to range, scope (title/author/subject/call_number/fulltext/image_description/identifier), or full_text_only. For object type (work/multivolume/volume/foldout), filter with filters.object_type or survey with sgbr_facet_values — hits do not carry it; their availability tells a fold-out plate from a book.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "sgbr_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNo1-based page number.
sortNoResult ordering: "relevance" (default, best match first — the only ordering that makes snippets meaningful), "year_asc"/"year_desc" by publication date, or "title_asc"/"title_desc" by title. Use a catalogue sort to find the earliest/latest or to page a set alphabetically; keep relevance when the query is a research question rather than an enumeration.relevance
queryNoFree-text query over the "Books as Data" corpus (~1.07M records, mostly German). Operators: bare terms AND; a|b OR; -term excludes (also -"phrase", -stem*); "exact phrase"; "a b"~N (proximity); term~1 (fuzzy; a bare term~ allows two edits, looser still); trailing * stem (Karte*). The backend never errors on misuse. This server refuses a query wrapped in parentheses (read as empty → whole corpus); everything else is forwarded as written, including forms that silently mis-search: parentheses elsewhere are stripped, mid-word ?/* wildcards return 0 in title/author/subject scope and an unrelated set in full text (use term~1 or OR the spellings), and the words AND/OR/NOT and field:value are literal text (warned). Empty query matches everything.
scopeNoRestrict the query to one field group: all (default), title, author, subject, call_number, fulltext, image_description (the AI descriptions of foldout plates — German, one sentence each), or identifier (an exact MMS id like 991104550959705501 or scan id like UBBS-00173645; a partial id returns 0, and a scan id of a multivolume or multi-copy work also returns that parent work).all
excludeNoDrop records carrying ANY of these values, per dimension (same keys and exact values as `filters`). Unlike a filter it keeps records with no value for that dimension, e.g. the untyped records filters.object_type can never reach. A misspelled value silently excludes nothing — take values from sgbr_facet_values.
filtersNoNarrow the result set by dimension. Values within one dimension are OR-ed; different dimensions are AND-ed. Dimension values are exact facet values — discover them with sgbr_facet_values facet=<dim> — except object_type, whose enum lists friendly keys. Note: subject_area, topic, foldout_type, genre_ai, content_flags are machine-derived enrichments (rule-based or AI), not catalogued data.
year_toNoOnly records published in or before this year (inclusive publication-date range).
page_sizeNoResults per page (max 25).
pages_maxNoOnly records with at most this many page images (see pages_min).
pages_minNoOnly records with at least this many page images (a multivolume work counts all its volumes'); records without scans are excluded.
year_fromNoOnly records published in or after this year (inclusive publication-date range).
full_text_onlyNoIf true, only return digitised items with machine-readable full text. A shortcut for the matching `filters.availability` values — prefer it over spelling one out, since the backend renames them between releases and this flag tracks every spelling.
ocr_quality_minNoOnly records whose OCR quality score (0–100, mostly 90–95) is at least this; records without their own scan (multivolume parent works, metadata-only records) are excluded.

Output Schema

NameRequiredDescriptionDefault
pageYes
sortYes
totalYes
resultsYes
has_moreYesMore records match than this page and the ones before it hold.
returnedYes
warningsNo
next_pageYesThe page to request next, or null — also while has_more is true, when the next page lies past the backend's result window (narrow the query to reach those records) or this page came back short (a warning says how to continue).
page_sizeYes
parsed_errorNo
applied_filtersNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.30.2

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the bar is lower, and the description adds genuine non-schema behavior: that hits do not carry object_type and that `availability` is what distinguishes a fold-out plate from a book. It omits anything about pagination limits or result volume in the prose (those live in the schema). Not contradictory to annotations.

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 the core action, then methods of narrowing, then the object_type caveat; every sentence carries information. It is dense but runs long and restates some schema content (filters, year range, scope) that the agent will also read in the schema.

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 not be explained, yet the description still names the hit fields and the `id` handoff. For a 13-parameter search tool with nested filter objects, it covers prerequisites, alternatives, narrowing strategy, and a known blind spot (object_type absent from hits).

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% and the schema is extremely detailed (query operator grammar, exact-facet semantics, sort trade-offs), so the description's parameter discussion is largely a summary of what is already structured. It does add the practical warning that hits lack object_type, but otherwise adds little meaning beyond the schema.

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 opens with a specific verb and resource ("Search records by relevance across full text and catalogue metadata") and immediately scopes the corpus and the return shape (title, author, date, place, language, type, availability, id). It distinguishes itself from siblings by naming sgbr_guide as a prerequisite, sgbr_get_record as the follow-up, and sgbr_facet_values for enumeration.

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?

It gives an explicit prerequisite ("Read sgbr_guide before your first search"), explicit routing for object type ("filter with filters.object_type or survey with sgbr_facet_values"), and an explicit next step (pass the `id` to sgbr_get_record). The narrowing options (filters, year range, scope, full_text_only) are laid out as the intended usage pattern rather than left to inference.

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