{"openapi":"3.1.0","info":{"title":"Scythian dictionary access","version":"2.0.0"},"paths":{"/api/health":{"get":{"tags":["scythian"],"summary":"Liveness probe","operationId":"health_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]},"type":"object","title":"Response Health Api Health Get"}}}}}}},"/api":{"get":{"tags":["scythian"],"summary":"API usage","operationId":"index_api_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Index Api Get"}}}}}}},"/api/search":{"get":{"tags":["scythian"],"summary":"Look a Proto-Scythian word up","operationId":"search_api_search_get","parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":80,"description":"The word to look up. xsc (default): a single Proto-Scythian lemma — plain ASCII works (tigri finds *tiɣri; macrons/carons are folded and ɣ→g, δ→d, β→b, ə→e, θ→t or th), with or without the reconstruction asterisk. eng: the English word whose Proto-Scythian equivalents you want, matched against every entry's glosses.","title":"Query"},"description":"The word to look up. xsc (default): a single Proto-Scythian lemma — plain ASCII works (tigri finds *tiɣri; macrons/carons are folded and ɣ→g, δ→d, β→b, ə→e, θ→t or th), with or without the reconstruction asterisk. eng: the English word whose Proto-Scythian equivalents you want, matched against every entry's glosses."},{"name":"search_language","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SearchLanguage","description":"Query language: xsc looks the Proto-Scythian lemma up directly; eng finds the lemmas whose English glosses match the query (local gloss index) and expands them into full entries.","default":"xsc"},"description":"Query language: xsc looks the Proto-Scythian lemma up directly; eng finds the lemmas whose English glosses match the query (local gloss index) and expands them into full entries."},{"name":"include_forms","in":"query","required":false,"schema":{"type":"boolean","description":"Attach each match's full descendants payload inline. Bounded by the per-search cap. Defaults to false here — the MCP tool defaults to true.","default":false,"title":"Include Forms"},"description":"Attach each match's full descendants payload inline. Bounded by the per-search cap. Defaults to false here — the MCP tool defaults to true."},{"name":"max_forms","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":12,"minimum":0},{"type":"null"}],"description":"Override the inline payload count this request (0–12).","title":"Max Forms"},"description":"Override the inline payload count this request (0–12)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/descendants":{"get":{"tags":["scythian"],"summary":"Descendants of one entry","operationId":"descendants_api_descendants_get","parameters":[{"name":"entry_id","in":"query","required":true,"schema":{"type":"string","pattern":"^\\*?[^\\W\\d_][\\w\\u0300-\\u036F'-]{0,79}$","description":"The bare lemma from a handle (a leading * is tolerated).","title":"Entry Id"},"description":"The bare lemma from a handle (a leading * is tolerated)."},{"name":"word_class","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":24,"pattern":"^[a-z ]+$","description":"Part-of-speech section from a handle, e.g. noun, adjective.","title":"Word Class"},"description":"Part-of-speech section from a handle, e.g. noun, adjective."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ScythianDescendants"},{"$ref":"#/components/schemas/DescendantsNotFound"}],"discriminator":{"propertyName":"category","mapping":{"descendants":"#/components/schemas/ScythianDescendants","not_found":"#/components/schemas/DescendantsNotFound"}},"title":"Response Descendants Api Descendants Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"DescendantNode":{"properties":{"language":{"type":"string","title":"Language","description":"Language name as printed, e.g. 'Alanic'."},"form":{"type":"string","title":"Form","description":"The reflex as printed (asterisk kept on reconstructions); may be empty for a branch header or a transliteration-only term.","default":""},"transliteration":{"type":"string","title":"Transliteration","description":"Romanization as printed beside the form, e.g. 'cirǧ'.","default":""},"qualifier":{"type":"string","title":"Qualifier","description":"How the word travelled or which variety carries it, e.g. 'borrowed', 'Digor'; empty for plain inheritance.","default":""},"children":{"items":{"$ref":"#/components/schemas/DescendantNode"},"type":"array","title":"Children"}},"type":"object","required":["language"],"title":"DescendantNode","description":"One node of a descendants tree: a reflex of the Proto-Scythian lemma in a\ndescendant (or borrowing) language, with its own descendants nested below.\n``form`` keeps the asterisk on reconstructed reflexes (``*ćirɣ``) and may be\nempty for a branch header (``Ossetian`` above its dialect lines) or a term\nWiktionary records only in transliteration (\"script needed\")."},"DescendantsHandle":{"properties":{"entry_id":{"type":"string","title":"Entry Id","description":"The bare lemma — the page-title tail, no asterisk."},"word_class":{"type":"string","title":"Word Class","description":"Part-of-speech section, e.g. 'noun', 'adjective'."},"context":{"type":"string","title":"Context","description":"Nearby headword / hint.","default":""},"pos_hint":{"type":"string","title":"Pos Hint","description":"Part-of-speech hint.","default":""},"forms":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/ScythianDescendants"},{"$ref":"#/components/schemas/DescendantsNotFound"}],"discriminator":{"propertyName":"category","mapping":{"descendants":"#/components/schemas/ScythianDescendants","not_found":"#/components/schemas/DescendantsNotFound"}}},{"type":"null"}],"title":"Forms","description":"The full descendants payload, populated when a search is asked to include it; None when not requested or beyond the cap. (Proto-Scythian has no inflection tables — this 'forms' slot carries descendants.)"}},"type":"object","required":["entry_id","word_class"],"title":"DescendantsHandle","description":"A structured anchor for fetching one entry's descendants: feed ``entry_id``\n(the bare lemma) + ``word_class`` (the POS section) to\n``get_descendants_scythian`` — or ask ``search`` to include the tree inline\n(``forms``)."},"DescendantsNotFound":{"properties":{"category":{"type":"string","const":"not_found","title":"Category","default":"not_found"},"entry_id":{"type":"string","title":"Entry Id"},"word_class":{"type":"string","title":"Word Class"},"found":{"type":"boolean","const":false,"title":"Found","default":false},"source":{"type":"string","title":"Source","default":"Wiktionary, the free dictionary (en.wiktionary.org), Proto-Scythian reconstruction entries. Wikimedia Foundation. Text available under CC BY-SA 4.0; attribution and share-alike required when republishing. (CC BY-SA 4.0)"}},"type":"object","required":["entry_id","word_class"],"title":"DescendantsNotFound","description":"No Proto-Scythian entry for this page/POS (no such page, no Proto-Scythian\nsection, or nothing parseable in it). ``found`` is False and there is no body."},"Entry":{"properties":{"headword":{"type":"string","title":"Headword","description":"The reconstructed headword, asterisk included."},"part_of_speech":{"type":"string","title":"Part Of Speech","default":""},"entry_id":{"type":"string","title":"Entry Id","description":"Bare lemma — feed to get_descendants_scythian.","default":""},"word_class":{"type":"string","title":"Word Class","description":"POS section — feed to get_descendants_scythian.","default":""},"senses":{"items":{"$ref":"#/components/schemas/Sense"},"type":"array","title":"Senses"}},"type":"object","required":["headword"],"title":"Entry","description":"One Proto-Scythian entry on the page: the reconstructed headword (asterisk\nincluded) with one part-of-speech section's senses."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ScythianDescendants":{"properties":{"category":{"type":"string","const":"descendants","title":"Category","default":"descendants"},"entry_id":{"type":"string","title":"Entry Id","description":"The bare lemma (page-title tail, no asterisk)."},"word_class":{"type":"string","title":"Word Class","description":"The part-of-speech section, e.g. 'noun'."},"found":{"type":"boolean","const":true,"title":"Found","default":true},"headword":{"type":"string","title":"Headword","description":"The headword as printed, asterisk included: '*tiɣri'.","default":""},"etymology":{"type":"string","title":"Etymology","description":"The entry's etymology line, plain text; may be empty.","default":""},"glosses":{"items":{"type":"string"},"type":"array","title":"Glosses","description":"The entry's English glosses — also what an eng search matches."},"tree":{"items":{"$ref":"#/components/schemas/DescendantNode"},"type":"array","title":"Tree","description":"The descendants tree in page order; empty when the entry records no reflexes."},"source":{"type":"string","title":"Source","default":"Wiktionary, the free dictionary (en.wiktionary.org), Proto-Scythian reconstruction entries. Wikimedia Foundation. Text available under CC BY-SA 4.0; attribution and share-alike required when republishing. (CC BY-SA 4.0)"}},"type":"object","required":["entry_id","word_class"],"title":"ScythianDescendants","description":"One entry's descendants payload: the headword, its English glosses and the\nreflex tree. ``tree`` MAY be empty — the entry exists but Wiktionary records no\nreflexes — while ``glosses`` still feed the English-query reverse index.\n``category`` discriminates this from the not-found shape — switch on it before\nreading the body."},"SearchLanguage":{"type":"string","enum":["xsc","eng"],"title":"SearchLanguage","description":"The query language. ``xsc`` (ISO 639-3 Scythian; Wiktionary's entry code is\n``xsc-pro``) looks a Proto-Scythian lemma up directly — ASCII spellings are\nfolded (``tigri`` finds ``*tiɣri``) via the reverse index. ``eng`` searches in\nreverse: the English query is matched against the indexed glosses of all\nlemmas, and each match is then looked up normally."},"SearchResult":{"properties":{"query":{"type":"string","title":"Query"},"language":{"$ref":"#/components/schemas/SearchLanguage"},"found":{"type":"boolean","title":"Found","description":"False when nothing matched. For an eng query, True means the gloss index named Proto-Scythian lemmas — entries may still be empty when none of them could be expanded (see translations)."},"handles":{"items":{"$ref":"#/components/schemas/DescendantsHandle"},"type":"array","title":"Handles"},"entries":{"items":{"$ref":"#/components/schemas/Entry"},"type":"array","title":"Entries"},"forms_truncated":{"type":"integer","title":"Forms Truncated","description":"How many handles did NOT get an inline descendants payload because the per-search cap was reached.","default":0},"translations":{"items":{"$ref":"#/components/schemas/TranslationSense"},"type":"array","title":"Translations","description":"Populated only for eng queries (always [] for xsc): the Proto-Scythian lemmas whose glosses match the query. Entries/handles below are the expanded dictionary entries of those lemmas."},"translations_truncated":{"type":"integer","title":"Translations Truncated","description":"How many distinct matched lemmas were NOT expanded into entries because the per-search expansion cap was reached (they still appear under translations).","default":0},"search_method":{"type":"string","enum":["direct","lemma_index","translations"],"title":"Search Method","description":"How the match was found: 'direct' = the query itself matched; 'lemma_index' = an ASCII/diacritic-folded spelling resolved via the reverse index; 'translations' = an English query resolved via the local gloss index.","default":"direct"},"resolved_from":{"type":"string","title":"Resolved From","description":"The original query when resolved via the index; else empty. xsc queries only — always empty for eng results.","default":""},"resolved_lemma":{"type":"string","title":"Resolved Lemma","description":"The lemma actually searched when resolved; else empty. xsc queries only — always empty for eng results.","default":""},"source":{"type":"string","title":"Source","default":"Wiktionary, the free dictionary (en.wiktionary.org), Proto-Scythian reconstruction entries. Wikimedia Foundation. Text available under CC BY-SA 4.0; attribution and share-alike required when republishing. (CC BY-SA 4.0)"}},"type":"object","required":["query","language","found"],"title":"SearchResult","description":"The result of a dictionary search."},"Sense":{"properties":{"label":{"type":"string","title":"Label","default":""},"gloss":{"type":"string","title":"Gloss"},"examples":{"items":{"type":"string"},"type":"array","title":"Examples"}},"type":"object","required":["gloss"],"title":"Sense","description":"One sense of an entry: the (HTML-stripped) Wiktionary definition line."},"TranslationSense":{"properties":{"sense":{"type":"string","title":"Sense","description":"The matched English gloss key — the query."},"terms":{"items":{"$ref":"#/components/schemas/TranslationTerm"},"type":"array","title":"Terms"}},"type":"object","required":["sense"],"title":"TranslationSense","description":"One English query sense and the Proto-Scythian lemmas whose glosses match\nit. Matching is by the local gloss index (built from every entry's glosses) —\nWiktionary's translation tables exclude reconstructed languages, so there is no\nper-sense table to mine; the single sense carries the query itself."},"TranslationTerm":{"properties":{"word":{"type":"string","title":"Word","description":"The bare Proto-Scythian lemma, e.g. 'tiɣri'."},"word_class":{"type":"string","title":"Word Class","description":"The lemma's part-of-speech section, e.g. 'adjective'.","default":""}},"type":"object","required":["word"],"title":"TranslationTerm","description":"One Proto-Scythian lemma the gloss index offers for an English query.\n``word`` is the bare lemma (what an ``eng`` search re-searches and what\n``get_descendants_scythian`` needs)."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}