Skip to main content
Glama

Concordance (keyword in context)

nabu_concord
Read-only

Generate keyword-in-context concordance rows for a word or exact lemma across the Nabu corpus, showing left/right context for usage scanning while preserving license fields.

Instructions

Concordance (KWIC — keyword-in-context) over the local nabu corpus: one row per hit as left context / matched keyword / right context, the keyword located in the PRISTINE edition text (accents intact). Give EXACTLY ONE of query (full-text, same syntax as nabu_search: words AND, "phrase", prefix*, diacritics optional) or lemma (exact dictionary form over the treebanks). Rows come in CORPUS order (urn/citation), not relevance — this is for scanning a word's usage, not ranking. Context is trimmed to width characters per side (default 40, max 120; … marks clipped context). Bounded (default 10, max 50) with an honest 'showing k' note; each row carries urn, language, license_class, and source — PRESERVE the license fields when quoting. Use nabu_show for a hit's full passage, nabu_search when you want ranked relevance rather than a scan.

Input Schema

NameRequiredDescriptionDefault
langNoISO-639-3 passage language filter: grc, lat, chu, got, orv, eng, …
lemmaNoDictionary form for exact-lemma treebank concordance. Mutually exclusive with query.
limitNoMaximum KWIC rows returned.
queryNoFull-text query. Mutually exclusive with lemma.
widthNoContext characters per side (left and right).
licenseNoExact effective license class filter.
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.2/5.0
Behavior3/5

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

Annotations only declare readOnlyHint=true, and the description goes well beyond that: CORPUS order rather than relevance, width trimming with ellipsis markers, bounded results with an 'showing k' note, and per-row urn/language/license_class/source with an instruction to preserve license fields when quoting. It stops short of describing pagination or what happens to matches that fall outside the trimmed width. This is rich disclosure for a read-only tool, but a 3 is the honest floor given that the licensing/restriction behavior is only partly spelled out.

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 operation and row shape, then constraints, then alternatives — a sensible order that lets an agent stop reading early. It is dense, however: heavy parentheticals and semicolon chains make it longer than strictly necessary, and the 'deliberately so' aside in the schema text is editorializing.

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 carries the return contract itself — row anatomy, ordering, truncation markers, and the limited-result note — plus the mutual-exclusion rule and the sibling routing. Nothing an agent needs to call this correctly or interpret its rows is missing.

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 coverage is 100%, so the schema already documents all seven parameters and their bounds. The description nevertheless adds genuine meaning the schema lacks — the query grammar (words AND, "phrase", prefix*, diacritics optional) and that `lemma` runs over treebanks. That extra meaning is real but partial, so it sits at the baseline rather than above it.

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?

Names the operation precisely (KWIC concordance), states the exact row shape (left context / matched keyword / right context), and pins the scope to 'the local nabu corpus' and the 'PRISTINE edition text (accents intact)'. This is clearly separable from nabu_search (ranked relevance) and nabu_show (full passage).

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 an explicit either/or rule — EXACTLY ONE of `query` or `lemma` — plus the condition selecting each alternative: nabu_show for a hit's full passage, nabu_search when ranked relevance is wanted rather than a scan. It also tells the agent when to set include_restricted and warns against casual use.

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