{
  "$schema": "https://modelcontextprotocol.io/schemas/server-card/v1.json",
  "serverInfo": {
    "name": "tipitakapali-mcp-server",
    "title": "Tipitaka Pali Canon, Bold Definitions & DPD MCP Server",
    "version": "1.2.0",
    "description": "MCP server exposing Chaṭṭha Saṅgāyana Tipiṭaka Pāḷi Canon books, 387K+ canonical bold definitions, multi-concept boolean search, sentence-level Pāḷi/translation alignment, and Digital Pāḷi Dictionary (DPD) lookups."
  },
  "transport": {
    "type": "http",
    "endpoint": "https://api.tipitakapali.org/mcp"
  },
  "capabilities": {
    "tools": [
      {
        "name": "get_bold_definitions",
        "description": "Query 387,000+ pre-indexed canonical & commentarial bold definitions (Aṭṭhakathā, Ṭīkā, Visuddhimagga, Mūla) with aligned translations and verifiable [book:cX:pY-LZ] citations.",
        "inputSchema": {
          "type": "object",
          "properties": {
            "word": {
              "type": "string",
              "description": "Pāḷi term to define (IAST, Velthuis, or Asian script, e.g. mettā, sati, anatta)"
            },
            "langs": {
              "type": "string",
              "default": "en",
              "description": "Comma-separated translation language codes (e.g. en,vi)"
            },
            "limit": {
              "type": "integer",
              "default": 8,
              "description": "Maximum ranked definitions to return (1–20)"
            }
          },
          "required": ["word"]
        }
      },
      {
        "name": "search_concepts",
        "description": "Multi-concept boolean intersection search across Pāḷi and translation FTS5 indexes (AND across concept groups, OR within each group's Pāḷi and English synonyms).",
        "inputSchema": {
          "type": "object",
          "properties": {
            "concept_groups": {
              "type": "array",
              "description": "2–4 concept groups, each with concept label, pali_terms, pali_stems, and english_keywords",
              "items": {
                "type": "object",
                "properties": {
                  "concept": { "type": "string" },
                  "pali_terms": { "type": "array", "items": { "type": "string" } },
                  "pali_stems": { "type": "array", "items": { "type": "string" } },
                  "english_keywords": { "type": "array", "items": { "type": "string" } }
                }
              }
            },
            "langs": { "type": "array", "items": { "type": "string" }, "default": ["en"] },
            "limit": { "type": "integer", "default": 12 }
          },
          "required": ["concept_groups"]
        }
      },
      {
        "name": "pali_dict_lookup",
        "description": "Look up Pāḷi words in the Digital Pāḷi Dictionary (DPD), canonical bold definitions, and classical lexicons",
        "inputSchema": {
          "type": "object",
          "properties": {
            "word": {
              "type": "string",
              "description": "Pāḷi word in Roman script (IAST or Velthuis, e.g. metta or mettā)"
            },
            "dict": {
              "type": "string",
              "enum": ["all", "dpd", "bold_def", "others"],
              "default": "dpd",
              "description": "Dictionary to query (dpd for Digital Pali Dictionary, bold_def for 387K+ canonical bold definitions, others for PTS/Burmese/Sinhala)"
            }
          },
          "required": ["word"]
        }
      },
      {
        "name": "pali_canon_search",
        "description": "Search the entire 520,000+ paragraph Chaṭṭha Saṅgāyana Tipiṭaka Pāḷi Canon and 23 translation indexes",
        "inputSchema": {
          "type": "object",
          "properties": {
            "query": {
              "type": "string",
              "description": "Search phrase or term in Pāḷi or a translation language (e.g. anicca, dukkha, anatta)"
            },
            "l": {
              "type": "string",
              "default": "pali",
              "description": "Language index (pali or any translation code e.g. en, vi, my, th)"
            },
            "pitaka": {
              "type": "string",
              "enum": ["all", "vin", "sut", "abh", "ann"],
              "default": "all",
              "description": "Piṭaka filter (vin=Vinaya, sut=Sutta, abh=Abhidhamma, ann=Añña)"
            }
          },
          "required": ["query"]
        }
      },
      {
        "name": "get_canonical_text",
        "description": "Retrieve Pāḷi canon book chapter content by book code and chapter number",
        "inputSchema": {
          "type": "object",
          "properties": {
            "book_code": {
              "type": "string",
              "description": "Canonical book code (e.g. s0101m.mul, s0502m.mul)"
            },
            "chapter_index": {
              "type": "integer",
              "description": "1-based chapter index"
            }
          },
          "required": ["book_code", "chapter_index"]
        }
      },
      {
        "name": "get_sentences",
        "description": "Sentence-level Pāḷi and aligned translations with shared line_id (99.7% match). Use for precise citations [book:cX:pY-LZ].",
        "inputSchema": {
          "type": "object",
          "properties": {
            "book_code": { "type": "string", "description": "Book code (e.g. s0101m.mul)" },
            "chapter_index": { "type": "integer", "description": "Chapter index (0-based)" },
            "para_index": { "type": "integer", "description": "Paragraph index" },
            "langs": { "type": "string", "description": "Comma-separated langs (e.g. en,vi)", "default": "en" }
          },
          "required": ["book_code"]
        }
      }
    ],
    "resources": [
      {
        "uri": "pali://canon/tree",
        "name": "Tipitaka Navigation Hierarchy",
        "mimeType": "application/json"
      }
    ]
  }
}
