Skip to main content
Glama

Dhamma.Gift — Pāli Canon

search

Search the Pali Canon on dhamma.gift by keyword/substring or REGEX (min 3 letters, no semantic search). Patterns like "kata.*dukkha", "vucc.*dukkha", "katha.*dukkha" find the canon's own definitions and expositions of a term. Returns a CENSUS of every matching sutta — id, title, match count, metaphor count, reader link — Pali only, ordered so that suttas that DEFINE the term come first, then ones NAMED after it, then by how often it occurs. Set include_segments for the matched Pali lines, include_translations (+ langs) for translations. 40 suttas by default (25 by occurrence count, plus 15 for suttas named after the term and ones defining it); metadata.totalFiles reports the true count, and limit takes a number or "all".

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "search"
  }
}

Input Schema

NameRequiredDescriptionDefault
exactNoWhole-word match only. Default: false.
langsNoTranslation languages to include with include_translations, e.g. ["ru","en"]. Default: none (Pali only).
limitNoHow many suttas to list: a number, or "all" for every match. Default: 40, composed of 25 by occurrence count plus 15 for suttas named after the term and defining it. Strict — the cap means the cap. metadata.totalFiles always carries the true match count, so a truncated answer still tells you how much more there is. Suttas whose TITLE matches the query rank first within their collection.
queryYesKeyword, phrase, or REGEX pattern to search for (Pali or a translation word). Patterns work and are the way to find definitions: "kata.*dukkha" (Katamañca … dukkhaṁ?), "vucc.*dukkha" (idaṁ vuccati dukkhaṁ), "katha.*dukkha" (Kathañca … hoti?).
scopeNodefault|all|dhamma|vinaya|abhi|khudakka|or comma-separated nikaya codes (dn,mn,...). Default: default (4 nikayas + 6 KN books).
translatorsNoExplicit translator keys, e.g. ["en_sujato"] to include Sujato, or ["ru_sv"]. Needed only to override the default translator choice.
include_segmentsNoAlso return the matched Pali segments (segment id, text, reader link). Default: false — the census alone.
include_translationsNoAlso return translations of the matched segments (implies include_segments). Default: false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedInput schema / properties / langs / items / maxLength
      Added value: +60
    • addedInput schema / properties / langs / maxItems
      Added value: +30
    • changedInput schema / properties / limit / anyOf
      Previous value: -[
      -  {
      -    "maximum": 9007199254740991,
      -    "minimum": 1,
      -    "type": "integer"
      -  },
      -  {
      -    "const": "all",
      -    "type": "string"
      -  }
      -]New value: +[
      +  {
      +    "maximum": 100000,
      +    "minimum": 1,
      +    "type": "integer"
      +  },
      +  {
      +    "const": "all",
      +    "type": "string"
      +  }
      +]
    • addedInput schema / properties / query / maxLength
      Added value: +200
    • addedInput schema / properties / scope / maxLength
      Added value: +200
    • addedInput schema / properties / translators / items / maxLength
      Added value: +60
    • addedInput schema / properties / translators / maxItems
      Added value: +30
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses result ordering (defining suttas first, then title-named, then by frequency), the exact default of 40 (25 by occurrence + 15 for defining/named), that limit is a strict cap, and that metadata.totalFiles reports the true count so truncation is visible. It omits auth/rate-limit context and never states the operation is read-only, though that is strongly implied by "search" and "census".

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?

Purpose and search-mode constraint are front-loaded in the first sentence, and the dense clauses about ordering, defaults, and truncation all carry information an agent needs. It is one long block of prose with heavy capitalization and parentheticals, which makes it harder to scan than it needs to be, but there is little pure filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter tool with no output schema and no annotations, the description covers the return shape (id, title, match count, metaphor count, reader link), ordering, defaults, and truncation semantics — enough to call it correctly and interpret results. The only real gaps are permission/auth expectations and any per-request cost, which for a public canon search are minor.

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 baseline is 3 and the schema already documents all eight parameters including defaults and the "all" constant. The description adds some genuine meaning on top — the composition of the default 40, that limit is a hard cap while totalFiles carries the true count, and that include_translations implies include_segments — but exact, scope, and translators are left entirely to 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?

States a specific verb and resource — search the Pali Canon on dhamma.gift — and immediately pins the modality: keyword/substring or REGEX, minimum 3 letters, explicitly NOT semantic search. The concrete examples ("kata.*dukkha", "vucc.*dukkha") plus the Pali-only scope make it unmistakable versus a generic text-retrieval sibling like get_text.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives real when-to-use guidance: regex patterns are "the way to find definitions" of a term, and the include_segments/include_translations flags are tied to their conditions (matched Pali lines, translations). It also rules out a whole approach ("no semantic search", min 3 letters). It does not name the siblings (get_text, compare_translations) or say when to prefer them, which keeps it short of a 5.

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.