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.

✅ Diacritics do not matter. anapanassati and ānāpānassati return the same thing; so do nibbana and nibbāna. Write the macrons if you know them, guess without them if you don't — neither costs you results.

⚠️ A common Pāli noun is a poor query. samudda (sea) matches ~700 segments and the top of that list is mostly section headings, not the passage that teaches anything. Two things to do instead:

  • Search the rarest distinctive noun in the passage, not its most obvious one. For the simile of the blind turtle, turtle/kacchapa gets there; ocean/samudda does not, in either language.

  • Prefer English, or raise the limit. turtle returns SN 56.47 and SN 56.48 inside the default window; kacchapa matches them too but ranks them past 30, so you need limit=50 to see them.

  • A word inside a compound may be out of reach entirely: samudda scores 0.50 against mahāsamudde (compounded and inflected), under the 0.6 cutoff, so SN 56.47 is not ranked low — it is excluded. Trying more spellings will not recover it; search a different word instead.

🔍 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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / edition / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "enum": [
      +      "dhiranandi",
      +      "jayasaro",
      +      "mbu",
      +      "royal"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / language / enum
      Added value: +[
      +  "pali",
      +  "english",
      +  "thai"
      +]
    • changedInput schema / properties / pitaka / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "enum": [
      +      "vinaya",
      +      "sutta",
      +      "abhidhamma"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. Changed5 schema fields changed
    • changedInput schema / properties / edition / description
      Previous value: -"ฉบับแปลภาษาไทย — \"dhiranandi\", \"jayasaro\", \"mbu\", \"royal\" หรือ None\n      (ใช้เฉพาะเมื่อ language=\"thai\" และ Thai เปิดอยู่)"New value: +"Thai translation edition — \"dhiranandi\", \"jayasaro\", \"mbu\",\n      \"royal\" or None. Only used when language=\"thai\" and Thai is\n      enabled on the server."
    • changedInput schema / properties / keyword / description
      Previous value: -"คำที่ต้องการค้นหา"New value: +"The word/phrase to search for."
    • changedInput schema / properties / language / description
      Previous value: -"ภาษาที่ค้นหา — ต้องอยู่ใน ENABLED_LANGUAGES ของเซิร์ฟเวอร์\n      (default: \"pali\"). ภาษาที่ปิดอยู่จะ return error."New value: +"Search language — must be in the server's ENABLED_LANGUAGES\n      (default: \"pali\"). Disabled languages return an error."
    • changedInput schema / properties / limit / description
      Previous value: -"จำนวนผลลัพธ์สูงสุด (default: 10, max: 50)"New value: +"Maximum results (default: 10, max: 50)."
    • changedInput schema / properties / pitaka / description
      Previous value: -"กรองตามปิฎก — \"vinaya\", \"sutta\", \"abhidhamma\" หรือ None (ค้นทั้งหมด)\n    ✅ v1.1+: ทั้ง 3 ปิฎกครบ (Sutta + Vinaya + Abhidhamma) เทียบเท่า\n    SuttaCentral bilara — ดู list_structure ตัวเลขสด"New value: +"Filter by pitaka — \"vinaya\", \"sutta\", \"abhidhamma\" or None\n    (all). ✅ v1.1+: all three pitakas at parity with SuttaCentral\n    bilara — see list_structure for live counts."
  3. First observed

TDQS

A5/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, but the description goes far beyond by disclosing ranking behavior (e.g., kacchapa ranks past 30), the effect of compounds on matching, and the fact that diacritics are ignored. It also explains the behavior of the language parameter and the server's enabled-language set. This adds substantial context without contradicting 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?

The description is long but meticulously structured with headers, emojis, and bullet points. It is front-loaded with the core purpose, followed by actionable hints and warnings. Every sentence earns its place, providing critical information without fluff.

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 the tool's complexity (5 parameters, output schema present, rich annotations), the description is exceptionally complete. It covers purpose, usage, alternatives, pitfalls, and parameter behavior, leaving no gaps an agent would need to guess at. The presence of an output schema means return format need not be described.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although schema coverage is 100%, the description adds essential meaning beyond the schema: it explains the practical implications of the language parameter (must be enabled), the limit parameter (raising it to 50 for certain queries), and the pitaka/edition filters. It also provides keyword-selection strategies (search rarest distinctive noun) that the schema alone cannot convey.

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 clearly states it performs keyword search across the Pāli Tipiṭaka using trigram word-similarity, with a specific verb and resource. It differentiates itself from sibling tools by explicitly naming search_hybrid and outlining when each is appropriate, so an agent can distinguish it immediately.

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?

The description gives explicit when-to-use vs. when-not-to-use guidance: it contrasts term lookup (use this) with concept search (use search_hybrid), and provides specific advice on translation to Romanised Pāli or English, diacritics, and raising the limit. It also explains the pitfalls of common nouns and compounds, leaving nothing to inference.

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.

Resources