fojin — Buddhist Canon Tools
v0.5.0Verify Buddhist-scripture quotes verbatim, cite to the CBETA line, search the Buddhist canons.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
search_corpus
Find where the Buddhist canon talks about something (佛经检索 / 哪部经讲到…). Use when the user asks which sutra/text says X, wants sources on a topic, or you need a real passage instead of recalling one. Semantic search over 10K+ texts in Classical Chinese, Pali, Sanskrit, Tibetan and English; each hit has a `urn`, title, snippet, similarity and `license`. `lang` filters by code (lzh=Classical Chinese, pi=Pali, sa=Sanskrit, bo=Tibetan, en=English). Next step: read_passage with the hit's text_id/juan_num to get the actual text.
| Parameter | Type | Description |
|---|---|---|
query * | string | |
lang | ||
limit | integer |
read_passage
Get the actual text of one fascicle (卷) — quote from this, not from memory. Use after search_corpus (pass its `text_id`/`juan_num`) whenever you are going to quote, summarise or explain a specific passage. Returns the canonical text with its `urn`.
| Parameter | Type | Description |
|---|---|---|
juan_num * | integer | |
text_id * | integer |
get_parallels
Cross-canon parallel passages aligned to a fascicle. fojin's alignment moat: given a Chinese fascicle, returns the aligned Pali/Tibetan/Sanskrit parallels so you can compare how a passage is rendered across traditions. A fascicle returns parallels for the *whole* juan — often hundreds. To narrow them to one passage, match the passage against `source_chunks[].text` and keep the parallels whose `aligns_source_chunk` equals that chunk_index. `urn` is filled for parallels that are fojin works; rows with `source="mitra-parallel"` are inline Skt/Tib sentences wit…
| Parameter | Type | Description |
|---|---|---|
juan_num * | integer | |
text_id * | integer |
lookup_dictionary
Look up a Buddhist term (名相/术语, e.g. 般若, 阿賴耶識, dukkha) in 39 dictionaries. Use when the user asks what a Buddhist term means, or before explaining a technical term yourself. Covers 佛光大辭典, 丁福保佛學大辭典, Soothill, Pali/Sanskrit/Tibetan dictionaries — 748K+ entries. Cite the dictionary name when you use a definition; a dictionary entry is not a scriptural citation.
| Parameter | Type | Description |
|---|---|---|
term * | string | |
limit | integer |
lookup_entity
Look up a Buddhist person, place, text or school in fojin's knowledge graph (人物/寺院/经典/宗派, e.g. 鳩摩羅什, 玄奘, 天台宗). Use for biographical or historical questions (who translated X, where Y lived, which school Z belongs to).
| Parameter | Type | Description |
|---|---|---|
query * | string | |
limit | integer |
resolve_urn
Turn a fojin URN (fojin:cbeta/T0001.1#p0001a01) into a reader link and check it exists. Use to dereference a citation someone gave you. For a paste-ready citation with BibTeX/RIS and licence, use `cite` instead.
| Parameter | Type | Description |
|---|---|---|
urn * | string |
verify_quote
ALWAYS call this before showing the user any quotation from Buddhist scripture (引用佛经原文前必须先核验). Verify that a Buddhist-canon quote exists VERBATIM in the corpus. Call this before presenting any quoted scripture to a reader: LLMs routinely invent plausible-looking quotes. Returns `verbatim` (bool), where it was found (`matches`, each with a resolvable `urn`), or the closest near-miss window when it wasn't. `cite` optionally narrows the search — a CBETA id ("T0374") or fojin URN ("fojin:cbeta/T0374.13") — and `cite_matched` reports honestl…
| Parameter | Type | Description |
|---|---|---|
quote * | string | |
cite | ||
juan |
cite
Paste-ready, machine-readable citation for a Buddhist-canon location (生成引用). Use when the user wants to cite a passage (paper, footnote, reference list, Zotero) or when you finish an answer that quoted scripture. Give either a fojin `urn` (e.g. "fojin:cbeta/T0374.14#p0450a12", from search/verify results) or a CBETA line head `ref` (e.g. "T12n0374_p0450a12"); optional `quote` is put into the citation. Returns `plain` (《大般涅槃經》卷14:「…」(CBETA, T12, no. 374, p. 450a12)), `cbeta_line_head`, line-level `urn`, `reader_url`, `bibtex`, `ris`, `…
| Parameter | Type | Description |
|---|---|---|
quote | ||
ref | ||
urn |
commentaries
What the historical commentators said about a passage of Buddhist scripture. Give a line of a sūtra and get back the classical commentaries that gloss it — each with the commentator's own words, the work it comes from, a quality tier, and a resolvable citation. This is the layer no other tool exposes for the Chinese canon: CBETA marks up almost none of it, and the alignment behind this was derived text by text. Two things to read carefully rather than skim. `total` is how many commentators the passage actually has — `truncated` says the list you got is a…
| Parameter | Type | Description |
|---|---|---|
quote * | string | |
limit | integer |