Skip to main content
Glama

Intertext parallels

nabu_parallels
Read-only

Find passages that quote or echo a given passage URN across the local Nabu corpus, enabling intertextual reception discovery rather than translation alignment.

Instructions

Passage-anchored intertext over the local nabu corpus: give ONE passage urn and get the passages that QUOTE or ECHO it — reception discovery, not translation alignment (that is nabu_align). Query-time over the same FTS index as nabu_search: the anchor is folded, cut into overlapping 4-word grams, each probed as an exact phrase; passages sharing grams are ranked by shared-gram count WEIGHTED BY RARITY (a rare shared phrase outweighs common function-word grams). Elision is folded across editions (SBLGNT ἐπʼ ≡ Swete ἐπ’), which is what lets Matthew 4:4 find LXX Deuteronomy 8:3. Each hits entry is one DOCUMENT (duplicate witnesses grouped; loci = how many of its passages matched) with its best passage urn, score, shared_grams, and the shared PHRASE spans (diacritic-folded — WHAT matched; nabu_show gives pristine text). Only the anchor's OWN document is excluded; translations self-exclude (no shared folded tokens). When the anchor carries gold treebank lemmas, lemma_echoes adds passages sharing ≥2 of its RARE lemmas (re-inflected/reordered allusion verbatim grams miss). Bounded (default 10, max 50) with an honest note; every hit carries urn, language, license_class, and source — PRESERVE the license fields when quoting. lang/license scope candidates. explain: true adds each hit's per-gram score decomposition (gram → df → weight → contribution; rows sum to the score exactly, non-contributing grams as zero rows).

Input Schema

NameRequiredDescriptionDefault
urnYesThe anchor passage urn (from a nabu_search/nabu_show hit) whose quotations and echoes to find.
langNoISO-639-3 passage language filter on the CANDIDATES: grc, lat, chu, …
lectNoLect filter on the candidates (P59-3, nabu-lects module): keep only hits whose resolution is this lect id or a more specific one under it — the same prefix semantics as nabu_search's lect (lect: "grc:koi" keeps Koine candidates, drops Classical and bare-grc ones). Errors if the module is not synced on this box.
limitNoMaximum hits per signal (surface parallels and lemma echoes).
explainNoAttach each hit's score decomposition as `explain`: one row per distinct anchor gram — gram, position, positions (anchor occurrences), df (probe document frequency), weight (1/df), contribution, status (shared · not_shared · too_common · stop). Contributions sum to the hit's score EXACTLY; grams adding nothing are explicit zero rows.
licenseNoExact effective license class filter on the candidates.
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.4/5.0
Behavior3/5

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

Annotations supply only readOnlyHint=true, so the description carries the burden — and it does disclose a lot beyond annotations: the 4-gram folding/probing algorithm, rarity weighting, cross-edition elision, document-level grouping of hits, lemma_echoes, and the explicit rationale for include_restricted defaulting to false. With the safety profile already covered by annotations and the core behavior well explained, a 4 is warranted rather than 5 since response envelope details (e.g. truncation signaling beyond 'honest note') stay vague.

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?

Dense and front-loaded: the purpose and the nabu_align contrast come first, then mechanics, then output shape, then limits. Every clause carries information, though the algorithm narration (gram probing, df weighting) is heavier than an agent strictly needs to select and invoke the tool.

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 shape precisely — hits as DOCUMENT entries with best passage urn, score, shared_grams, shared phrase spans, plus lemma_echoes and the explain decomposition. For a moderately complex 7-parameter tool this leaves nothing an agent needs 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 still adds meaning the schema does not: it explains why include_restricted defaults false ('must never leak private or license-restricted texts casually'), that lang/license scope CANDIDATES rather than the anchor, and that explain rows sum exactly to the score. That is genuine added value over the structured fields.

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 ('passage-anchored intertext ... give ONE passage urn and get the passages that QUOTE or ECHO it') and explicitly contrasts with nabu_align ('not translation alignment') and nabu_search (same FTS index). An agent can distinguish this from all 13 siblings 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 the entry condition (one passage urn from a nabu_search/nabu_show hit), names the alternative tool for the near-miss use case (nabu_align), and states exclusions ('only the anchor's OWN document is excluded'). It also warns about license preservation when quoting, which is a usage constraint an agent must honor.

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