{"server":"viet-dien","version":"1.0.0","endpoint":"https://www.viet-dien.com/mcp","protocol":"mcp/streamable-http","instructions":"This server searches the Vi\u1ec7t \u0110i\u1ec3n corpus: digitized H\u00e1n-N\u00f4m (Classical Chinese\nand Ch\u1eef N\u00f4m) texts from the Digitizing Vietnam collection, held as page images\nwith machine-generated OCR. It is read-only.\n\nHow to work with it:\n\n1. Start wide, then narrow. `distribution` tells you which texts carry a term\n   and how heavily, so you can choose what to read before spending calls on\n   pages. `concordance` shows every occurrence in context at once \u2014 reach for\n   it before fetching pages one at a time.\n2. Use the search syntax. The words of a classical collocation are often\n   separated on the page, so a plain phrase search misses what `NEAR/10` finds.\n3. The text is machine OCR of woodblock prints and it contains errors. Read it\n   critically, say when a reading is uncertain, and check a doubtful passage\n   against the page image (`get_page` returns its URL).\n4. A sentence runs across the page break. When quoting near the edge of a page,\n   pass `context` to `get_page` so the clause is whole.\n5. Cite everything with links. Every tool result carries a viewer_url on\n   https://www.viet-dien.com \u2014 give it as a clickable link for each source you use, so the reader\n   can open the original page image beside the OCR. Never cite a page without\n   linking it.\n\nCorpus source: Digitizing Vietnam (https://www.digitizingvietnam.com).","tools":[{"name":"search_corpus","title":"Search the OCR","description":"Find pages whose text contains a query, with a snippet of each. Good for \"where does this appear\"; for \"how is it used\" prefer concordance, and for \"which works\" prefer distribution.\n\nQuery syntax:\n\u570b\u5bb6              the characters together, in order\n\"\u898b\u805e \u5c0f\u9304\"        a quoted phrase\n\u570b AND \u5bb6         both somewhere on the same page\n\u570b\u5bb6 OR \u5929\u4e0b       either one\n\u570b NOT \u5bb6         the first, without the second\n\u570b NEAR/10 \u5bb6     within 10 characters of each other\n\u570b?\u5bb6             ? is any single character\n\u898b\u805e*\u9304            * is a short gap (up to 8 characters)\n\nA character also matches its other glyph forms by default (\u70ba finds \u7232, \u771f finds\n\u771e). Pass variants=0 (API) or variants=false (MCP) to turn that off. Simplified\n\u21c4 traditional conversion is separate and always applies, so \u7232 finds \u4e3a either\nway.","inputSchema":{"type":"object","properties":{"query":{"type":"string","description":"What to look for, in H\u00e1n characters."},"limit":{"type":"integer","description":"Maximum pages to return (default 30, max 300)."},"variants":{"type":"boolean","default":true,"description":"Match a character's other glyph forms too (\u70ba finds \u7232). Set false to turn that off. Simplified/traditional conversion is separate and applies either way."}},"required":["query"]}},{"name":"concordance","title":"Occurrences in context","description":"Every occurrence of a term across the corpus, one line each with context either side (a KWIC concordance). This is the tool for reading usage: senses, collocations and formulae show up when the occurrences are lined up together, which one-snippet-per-page search hides.\n\nQuery syntax:\n\u570b\u5bb6              the characters together, in order\n\"\u898b\u805e \u5c0f\u9304\"        a quoted phrase\n\u570b AND \u5bb6         both somewhere on the same page\n\u570b\u5bb6 OR \u5929\u4e0b       either one\n\u570b NOT \u5bb6         the first, without the second\n\u570b NEAR/10 \u5bb6     within 10 characters of each other\n\u570b?\u5bb6             ? is any single character\n\u898b\u805e*\u9304            * is a short gap (up to 8 characters)\n\nA character also matches its other glyph forms by default (\u70ba finds \u7232, \u771f finds\n\u771e). Pass variants=0 (API) or variants=false (MCP) to turn that off. Simplified\n\u21c4 traditional conversion is separate and always applies, so \u7232 finds \u4e3a either\nway.","inputSchema":{"type":"object","properties":{"query":{"type":"string","description":"The term to line up."},"width":{"type":"integer","description":"Characters of context each side (default 30, max 120)."},"limit":{"type":"integer","description":"Maximum lines (default 60, max 500)."},"per_text":{"type":"integer","description":"At most this many lines from any one work, so a single heavy text cannot fill the result. Useful for sampling across the corpus."},"variants":{"type":"boolean","default":true,"description":"Match a character's other glyph forms too (\u70ba finds \u7232). Set false to turn that off. Simplified/traditional conversion is separate and applies either way."}},"required":["query"]}},{"name":"distribution","title":"Which texts carry a term","description":"Matching pages grouped by work, heaviest first. Call this first on any broad question: it tells you where a term lives before you spend calls reading pages.\n\nQuery syntax:\n\u570b\u5bb6              the characters together, in order\n\"\u898b\u805e \u5c0f\u9304\"        a quoted phrase\n\u570b AND \u5bb6         both somewhere on the same page\n\u570b\u5bb6 OR \u5929\u4e0b       either one\n\u570b NOT \u5bb6         the first, without the second\n\u570b NEAR/10 \u5bb6     within 10 characters of each other\n\u570b?\u5bb6             ? is any single character\n\u898b\u805e*\u9304            * is a short gap (up to 8 characters)\n\nA character also matches its other glyph forms by default (\u70ba finds \u7232, \u771f finds\n\u771e). Pass variants=0 (API) or variants=false (MCP) to turn that off. Simplified\n\u21c4 traditional conversion is separate and always applies, so \u7232 finds \u4e3a either\nway.","inputSchema":{"type":"object","properties":{"query":{"type":"string","description":"The term to locate."},"variants":{"type":"boolean","default":true,"description":"Match a character's other glyph forms too (\u70ba finds \u7232). Set false to turn that off. Simplified/traditional conversion is separate and applies either way."}},"required":["query"]}},{"name":"get_page","title":"Read one page","description":"One page's OCR text, with the URL of the source page image and a viewer link to cite. Pass context to pull in the pages either side \u2014 a classical sentence runs across the page break, so a quotation from one page alone can end mid-clause.","inputSchema":{"type":"object","properties":{"text_id":{"type":"integer","description":"The work, as returned by any search tool."},"page_number":{"type":"integer","description":"Which page."},"context":{"type":"integer","description":"Also return this many pages either side (0-3, default 0)."}},"required":["text_id","page_number"]}},{"name":"get_full_text","title":"Read a whole work","description":"A whole work (or a run of pages) in one call, pages marked. Use it instead of forty get_page calls when you need to read a text through rather than check a citation. Ask for a page range on a long work.","inputSchema":{"type":"object","properties":{"text_id":{"type":"integer","description":"The work to read."},"from_page":{"type":"integer","description":"First page (optional)."},"to_page":{"type":"integer","description":"Last page (optional)."}},"required":["text_id"]}},{"name":"list_texts","title":"Browse the collection","description":"The works in the corpus, filtered by title \u2014 romanized (\u0110\u1ea1i Vi\u1ec7t s\u1eed k\u00fd) or Sinitic (\u5927\u8d8a\u53f2\u8a18) \u2014 or by catalogue field: author, year of composition, subject, language. Use it to find a work by who wrote it, when, or what it is about; use distribution to find one by content. Diacritics are ignored throughout, so \"nguyen\" finds \"Nguy\u1ec5n\". Cataloguing is uneven: an author is recorded for about 39% of the corpus and a year for about 49%, so a year filter cannot see the undated remainder \u2014 do not report an empty or short result as evidence that the corpus holds nothing of that kind.","inputSchema":{"type":"object","properties":{"query":{"type":"string","description":"Title filter (optional)."},"author":{"type":"string","description":"Author or contributor, whole or part."},"year_from":{"type":"integer","description":"Earliest year; corpus runs 1433-1989."},"year_to":{"type":"integer","description":"Latest year."},"subject":{"type":"string","description":"Subject heading, e.g. History, Philosophy."},"language":{"type":"string","description":"Language, e.g. Chinese, Vietnamese."},"limit":{"type":"integer","description":"Maximum works (default 50, max 500)."},"offset":{"type":"integer","description":"Skip this many, for paging."}}}},{"name":"get_text_info","title":"A work's details","description":"One work's metadata and the page numbers actually digitized (they need not be contiguous), plus links to the viewer and to the item on Digitizing Vietnam.","inputSchema":{"type":"object","properties":{"text_id":{"type":"integer","description":"The work."}},"required":["text_id"]}},{"name":"char_variants","title":"Interchangeable glyph forms","description":"Which other forms of a character search treats as the same. Woodblock carvers used whichever glyph they liked, so \u70ba and \u7232 are one word; this reports the grouping, so you can explain a match rather than assert it.","inputSchema":{"type":"object","properties":{"query":{"type":"string","description":"One or more characters."}},"required":["query"]}},{"name":"corpus_stats","title":"Corpus size","description":"How many works and pages are currently digitized. Worth checking before making a claim about coverage.","inputSchema":{"type":"object","properties":{}}}]}
