Skip to main content
Glama

Keyword Search

search_by_keyword
Read-onlyIdempotent

Keyword search across the Pāli Tipiṭaka (trigram word-similarity).

Searches the configured enabled language(s) on the server. Filterable by pitaka and translation edition.

💡 Hints for the AI client: The system's canonical reference is Romanised Pāli (from SuttaCentral). If the user asks in a disabled or unsupported language, translate the keyword to Romanised Pāli (preferred) or English before calling this tool — e.g. "suffering" → "dukkha", "mindfulness of breathing" → "ānāpānassati". See the server instructions for the enabled language set.

🔍 Pick the right search tool for the question shape:

  • Term lookup (exact word appearances) — e.g. "occurrences of ānāpānassati": this tool is best (trigram nails the exact word).

  • Concept search ("discourses about X") — e.g. "discourses about mindfulness of breathing": use search_hybrid instead. Canonical Pāli has two quirks that hurt keyword search for concepts: • Section headings (Ānāpānapabba) often use a different word than the teaching body, which uses verb forms (assasati, passasati, dīghaṁ, rassaṁ). E.g. DN22's Ānāpānapabba has 16 segments but the word ānāpāna appears in only 2 (header + footer) — the actual teaching segments won't match. • Stock phrases (e.g. So satova assasati, satova passasati) recur in 10+ suttas, so a keyword query ranks broadly and won't pinpoint the canonical reference.

  • General keyword survey — set limit≥30 and filter client-side, or call multiple related forms (root verb + noun + compound).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum results (default: 10, max: 50).
pitakaNoFilter by pitaka — "vinaya", "sutta", "abhidhamma" or None (all). ✅ v1.1+: all three pitakas at parity with SuttaCentral bilara — see list_structure for live counts.
editionNoThai translation edition — "dhiranandi", "jayasaro", "mbu", "royal" or None. Only used when language="thai" and Thai is enabled on the server.
keywordYesThe word/phrase to search for.
languageNoSearch language — must be in the server's ENABLED_LANGUAGES (default: "pali"). Disabled languages return an error.pali

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

TDQS

A4.9/5.0
Behavior5/5

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

The annotations already declare readOnlyHint=true and idempotentHint=true, but the description adds substantial behavioral context: it searches only enabled languages, uses trigram similarity, and explains two quirks that affect results (section headings differ from teaching-body verbs, and stock phrases cause broad ranking). It even illustrates with DN22 segment counts. This goes well beyond the structured annotations.

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

Conciseness5/5

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

Though longer than typical, the description is extremely well-structured with emoji headers, bullet points, and a summary line up front. Every sentence carries useful information (translation hints, tool selection, search limitations). No filler or repetition exists; the density is high but purposeful.

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?

The tool has complex nuances (language enablement, translation needs, and differences between keyword and hybrid search). The description addresses all of these comprehensively, including examples and counterexamples. Since an output schema exists, the absence of return-value details is not a gap. For a tool with this complexity, the description is fully complete.

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 descriptions cover 100% of parameters, establishing a baseline of 3. The description adds meaningful guidance for the keyword parameter by instructing the agent to translate user terms to Romanised Pāli or English when needed, and it provides usage tips for limit (set ≥30 for surveys). It also clarifies that edition is used only with language='thai' and enabled, which augments 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 clear one-sentence definition: 'Keyword search across the Pāli Tipiṭaka (trigram word-similarity).' It names the specific verb (search), the resource (Pāli Tipiṭaka), and the method (trigram word-similarity). It also explicitly differentiates from sibling tools by stating this tool is best for exact term lookup and directing concept searches to search_hybrid.

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?

A dedicated section 'Pick the right search tool for the question shape' gives explicit decision criteria: use this tool for term lookup, use search_hybrid for concept search, and for general keyword surveys set limit≥30 or call multiple related forms. It also advises translating keywords to Romanised Pāli when the user speaks an unsupported language, including concrete examples.

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.

TDQS

A4.7/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose. Search tools are differentiated by strategy (keyword, hybrid, semantic, exhaustive). Reading tools separate content retrieval, comparison, and viewer rendering. Parsing and definition tools have complementary roles. No overlapping functionality.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern in snake_case, e.g., compare_translations, get_sutta, list_editions, search_by_keyword. The only slight deviation is open_sutta_viewer using 'open' instead of 'view', but it still fits the pattern.

Tool Count5/5

12 tools is well within the ideal range for a domain-specific server. Each tool addresses a distinct need: retrieval, search, parsing, dictionary, citation, structure overview, and comparison. No bloat or thinness.

Completeness5/5

The tool surface covers the full lifecycle for a read-only Pāli canon server: fetching content, searching (multiple modes), viewing with translations, comparing translations, parsing words, looking up definitions, listing editions and structure, and generating citations. There are no obvious gaps for the intended use case.

Resources