Skip to main content
Glama

Search the corpus

nabu_search
Read-only

Search ancient-text corpora by full-text query or exact lemma, filtering by language, date, morphology, proximity, translations, or meter.

Instructions

Search nabu, a local corpus of ancient texts (polytonic Greek, Latin, Old Church Slavonic, Gothic, and more: literary editions, documentary papyri, gold treebanks, parallel English translations). Give EXACTLY ONE of: query — full-text FTS5 (words AND by default, "quoted phrase", prefix*; diacritics optional, μηνιν finds μῆνιν) — or lemma — exact dictionary form over the lemma index, every tier it holds: gold treebank annotation unlabeled, silver/equivalence hits labeled by a tier field (λέγω finds εἶπας, εἰπεῖν, every inflection; add morph — e.g. "case=dat,number=pl" — to keep only attestations with that morphology, each hit showing the decoded evidence). Add near for PROXIMITY — keep only hits where that term sits within window words (default 10, 0=adjacent) of query (or lemma, expanded to its surface forms) in the SAME passage, order-independent; both matched terms are bracketed in the snippet (near does not compose with morph). Hits are relevance-ranked and bounded (default 10, max 50) with an honest 'showing k' note; each carries urn, language, license_class, and source — PRESERVE the license fields when quoting. meter/meter_pattern (text search only) restrict hits to metrically SCANNED passages — the pedecerto (Latin) / hypotactic (Greek) meter enrichment layer; the note names that layer or explains an empty one. words (text search only) is the Tibetan word-grain filter: keep only hits whose match aligns with word boundaries per the nabu-data segmentation dataset (degrades honestly for non-Tibetan queries or an unsynced module). Three further LANES replace the ranked text search (each composes with the args its schema line names, nothing else): fuzzy: true — substring/fragment search over the documentary trigram index (]μηνιν αει[, the CLI's --fuzzy); translations: true — the query matched against the translations held in passage annotations, hits being the ORIGINAL passages with the matched layer (the CLI's --translations); sense — the word-sense desk (a DCS WordSem id or sense name → the passages whose tokens cite it, each with its citing tokens; the CLI's nabu sense). betacode: true reads query/lemma/near as TLG Beta Code (mh=nin → μῆνιν). Use nabu_show with a hit's urn for the full passage, nabu_status for what the corpus covers.

Input Schema

NameRequiredDescriptionDefault
toNoLatest date: signed historical year; composes with from.
fromNoEarliest date: signed HISTORICAL year, negative = BCE, no year 0 (-300 = 300 BCE, 14 = 14 CE). Filters the document timeline — the dated documents of most sources, every date class (see date_basis to pick one); a document the timeline does not date is absent under a date filter. Text search only (not lemma).
kindNoDocument-kind filter (P99, text search only): the ruled cross-corpus classification classes (config/kind_classes.yml — funerary, letter, literary, divination, …). FAMILY matching at any depth: a path prefix matches its whole family (funerary ⊇ funerary/epitaph; literary/narrative ⊇ literary/narrative/epic), a full path narrows, an explicit % pattern matches as given. The honesty buckets are first-class values: `unknown` (upstream's own "cannot determine") and `unmapped` (a raw value awaiting a fold rule). Only classified documents can match — most of the corpus carries no kind facet and falls out under the filter (`nabu kind census` lists the classes).
langNoISO-639-3 passage language filter: grc, lat, chu, got, orv, eng, …
lectNoLect filter (P57-4, nabu-lects module, text search only): keep only hits whose (language, source) resolves to this lect id or a more specific one under it — prefix semantics over the nabu-lects anchor[:stage][/variety][@ortho] grammar (lect: "lat" matches lat:med; lect: "lat:med" matches lat:med and lat:med/xyz, not lat:cla). Errors if the nabu-lects module is not synced on this box.
nearNoProximity: keep only hits where this term occurs within `window` words of query (or lemma) in the SAME passage. FTS5 NEAR over the folded search forms, order-independent; expands a lemma anchor to its attested surface forms first. Does NOT compose with morph.
fuzzyNoFragment lane (the CLI's search --fuzzy): `query` is a literal substring/fragment matched over the documentary trigram index (editorial [ ] stripped, diacritics folded, at least 3 characters after folding) — not FTS syntax. Hits carry a folded `snippet` with the match bracketed; `coverage` lists the sources the index covers. Composes with lang/license/from/to/century/date_basis/place/kind/facets/limit only.
glossNoToken-gloss filter WITH lemma: keep attestations whose upstream token gloss contains this word (whole word, case-insensitive) — bhsa/achemenet (English), aes/tlhdig (German). E.g. lemma "דבר" + gloss "word" splits BHSA's consonantal homograph from "speak". Composes with morph; not with near. Lemma hits from those sources always carry token_gloss. WITHOUT lemma (and no query): the gloss lane — every WORD some source glosses this ("king" → BHSA מלך, achemenet šarru, …) across lemmas; words AND, "phrase", prefix*, diacritic-insensitive. Each hit is a word {lemma, form, gloss, source, language, tokens, passages} with urn = its first attestation; `coverage` lists the indexed sources. Composes with lang/license/limit only.
lemmaNoDictionary form for exact-lemma search over the lemma index (every tier; non-gold hits carry `tier`). Mutually exclusive with query.
limitNoMaximum hits returned.
meterNoMeter facet (P45-5): only passages carrying a meter enrichment (the pedecerto/hypotactic scansion layer) whose meter code/name matches case-insensitively (pedecerto codes H, P, …; hypotactic names like 'dactylic hexameter'). Text search only (not lemma/near); most of the corpus is unscanned and absent under it. The note names the source layer, or explains an empty/unknown one.
morphNoMorphology facets, only WITH lemma: comma-joined key=value in Universal Dependencies vocabulary (case, number, gender, person, tense, mood, voice, degree; values dat, pl/sg, masc, aor, opt, sub…), all required. E.g. "case=dat,number=pl". UD treebanks match on feats; PROIEL/TOROT positional tags, GLAUx's AGDT postags, Diorisis analyses, BHSA/DSS (ETCBC/Abegg) features, OSHB morph codes, CorA msd (ReM/ReN) and morph (REF), IMP msd (goo300k), Menota msa and Coptic Scriptorium pos tags (polarity, prontype, definite, verbform) are decoded to the same names (Hebrew/Aramaic add state, stem, conjugation: e.g. "stem=piel,conjugation=wayq"); ORACC has no inflectional morphology so these facets never match it.
placeNoProvenance filter (P75 C-1): a namespaced place ref (tm:2810, cigs:GIR) matches identity claims on the document's place_ref axis; a place NAME resolves through the derived place index and registry decisions (name recall kept); a LIKE pattern (oxyrhynch%) stays the name lane. The note names the lane that answered. Localized documents only.
queryNoFull-text query. Mutually exclusive with lemma.
senseNoSense desk (the CLI's `nabu sense TERM`): a sense id (59344, or comma-joined ids) or a sense NAME matched case-insensitively against the sense shelf (finger; LIKE wildcards: circum%). Returns the matched senses (id, headword, gloss, passage count) and the passages citing them, each with its citing tokens (form, lemma, ids). Replaces query/lemma; composes with sense_gloss/limit only.
wordsNoTibetan word-grain filter (P54-4, text search only): Tibetan is indexed at syllable grain, so a multi-syllable query also matches an accidental syllable run crossing a word boundary — words: true keeps only hits whose matched span aligns with word boundaries per the nabu-data xct/segmentation dataset (present-only word_grain key when applied). Non-Tibetan queries or an unsynced module degrade to plain search with a word_grain_note, never an error.
facetsNoFacet filters (text search only), an object of facet name → pattern, all required (AND): any facet the catalog carries, at document grain (genre, province, material, collection, author…) or passage grain (sillok subject, itkc genre) — {"subject": "왕실-%"}. The pattern matches the value or its ref case-insensitively; LIKE % patterns pass through. At most 8 pairs; composes with kind (both must hold). Unfaceted documents fall out under it.
scriptNoScript filter (P75 C-2), ISO 15924-style registry tag (latn, xsux, egyd): keeps documents whose held text carries the ~script lect axis OR whose artifact-script axis claims the tag ("Latin-script Gaulish"). Text search only.
windowNoWith near: max words between the two terms (default 10; 0 = adjacent).
centuryNoShorthand for one century's from/to (6 = 6th c. CE, -2 = 2nd c. BCE); mutually exclusive with from/to.
licenseNoExact effective license class filter.
betacodeNoBeta Code input (the CLI's search --betacode): query, lemma and near are TLG Beta Code, transliterated to Greek before matching (mh=nin → μῆνιν; case-blind, *capitals, FTS quotes and prefix* pass through). The decoded terms come back in a present-only `betacode` object. A deliberate flag — never auto-detected; not with sense/similar_to.
date_basisNoDate-basis filter (CLI --date-basis parity, text search only): keep only documents whose PRIMARY dated row is of one of these classes, comma-joined — artifact (the source's own artifact/typed date), composition (attributed author-era dating), edition (a print/edition year), silver (a model ESTIMATE, never an upstream claim). Composes with from/to/century: `date_basis: "artifact"` holds out author-era datings. An unknown class is refused naming the known set.
similar_toNoA passage URN: return its SEMANTIC neighbors instead of a text search (same-language cross-edition retrieval over the local vector store — other witnesses of a verse, passages saying the same thing). Banded close/near/loose, never raw scores; same-language ONLY (cross-language measured unreliable and not served); model named in the payload — statistical similarity, never a curated alignment (nabu_align/nabu_parallels serve those). Replaces query/lemma; composes with limit only.
sense_glossNoWith sense: also match the term inside the sense's gloss ("linear measure").
translationsNoTranslations lane (the CLI's search --translations): `query` (words AND, "phrase", prefix*) is matched against the translations held in passage ANNOTATIONS (coptic, cdli/ebl #tr, hittite-glossed trans_de, corph, …); hits are the ORIGINAL passages, each naming the matched `layer` with a bracketed `snippet` of it. Composes with lang (the original's language)/license/limit only.
meter_patternNoMeter facet: exact foot/scansion pattern, case-insensitive (pedecerto DSDS, hypotactic '-u u -uu …'); composes with meter or stands alone. Text search only.
include_restrictedNoAlso serve research_private/restricted material. Default false and deliberately so: this surface must never leak private or license-restricted texts casually. Set true only when the requester understands and will honor the restriction.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.7.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true, but the description adds substantial behavioral context: results are relevance-ranked and bounded (default 10, max 50) with an honest 'showing k' note; hits carry urn, language, license_class, and source with an instruction to preserve license fields; unsynced modules degrade honestly; nabu-lects errors are called out; and include_restricted carries an explicit leakage warning.

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

Conciseness2/5

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

Core usage is front-loaded, but the description is a dense, run-on block of semicolon-linked clauses that repeatedly restates schema-level composition rules for fuzzy, sense, translations, and similar_to. For a 28-parameter tool it is difficult to scan and many sentences duplicate information already 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?

Given 28 parameters, no output schema, and minimal annotations, the definition covers the search modes, lane composition, return-shape cues, licensing obligations, degradation behavior, and where to go next via nabu_show and nabu_status. Nothing an agent needs in order to choose and invoke the tool appears to be 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 is 3. The description nevertheless adds cross-parameter semantics that no single schema property fully captures: query/lemma mutual exclusivity, lane replacement rules, near/morph incompatibility, and lane-specific composition sets such as fuzzy composing only with lang/license/from/to/century/date_basis/place/kind/facets/limit.

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: 'Search nabu, a local corpus of ancient texts.' It distinguishes the search tool from siblings by routing full-passage retrieval to nabu_show and coverage questions to nabu_status, and it names distinct search lanes (fuzzy, translations, sense, similar_to).

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?

Explicitly states 'Give EXACTLY ONE of: query ... or lemma,' defines lanes that 'replace the ranked text search,' and lists composition constraints such as 'near does not compose with morph' and the exact arg set fuzzy composes with. It also names sibling alternatives and when to use them.

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