{"openapi":"3.1.0","info":{"title":"Latin dictionary access","version":"2.1.1"},"paths":{"/api/health":{"get":{"tags":["latin"],"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":["latin"],"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":["latin"],"summary":"Look a Latin 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. lat (default): a single Latin word — any form; an inflected form is resolved to its lemma via cached paradigms or Morpheus (see search_method in the response); macrons optional. eng: the English word whose Latin equivalents you want — multiword entries like 'give up' work.","title":"Query"},"description":"The word to look up. lat (default): a single Latin word — any form; an inflected form is resolved to its lemma via cached paradigms or Morpheus (see search_method in the response); macrons optional. eng: the English word whose Latin equivalents you want — multiword entries like 'give up' work."},{"name":"search_language","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SearchLanguage","description":"Query language: lat looks the Latin word up directly; eng finds an English word's per-sense Latin equivalents (the translations block) and expands them into full entries.","default":"lat"},"description":"Query language: lat looks the Latin word up directly; eng finds an English word's per-sense Latin equivalents (the translations block) and expands them into full entries."},{"name":"include_forms","in":"query","required":false,"schema":{"type":"boolean","description":"Attach each match's full inflection table 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 inflection table 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 number of inline tables this request (0–12).","title":"Max Forms"},"description":"Override the number of inline tables 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/inflections":{"get":{"tags":["latin"],"summary":"Inflection table","operationId":"inflections_api_inflections_get","parameters":[{"name":"entry_id","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-zĀāĒēĪīŌōŪūȲȳÄäÖöËë\\-']{1,80}$","description":"Page title (the lemma) from a handle.","title":"Entry Id"},"description":"Page title (the lemma) from a handle."},{"name":"word_class","in":"query","required":true,"schema":{"type":"string","description":"Part-of-speech section from a handle, e.g. verb, noun.","enum":["abbreviation","acronym","adjective","adverb","affix","article","character","circumfix","classifier","combining form","conjunction","contraction","counter","determiner","diacritical mark","idiom","infix","initialism","interfix","interjection","letter","ligature","noun","number","numeral","participle","particle","phrase","postposition","prefix","preposition","prepositional phrase","pronoun","proper noun","proverb","punctuation mark","romanization","root","suffix","symbol","verb"],"title":"Word Class"},"description":"Part-of-speech section from a handle, e.g. verb, noun."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/LatinNominalParadigm"},{"$ref":"#/components/schemas/LatinVerbalParadigm"},{"$ref":"#/components/schemas/ParadigmNotFound"}],"discriminator":{"propertyName":"category","mapping":{"nominal":"#/components/schemas/LatinNominalParadigm","verbal":"#/components/schemas/LatinVerbalParadigm","not_found":"#/components/schemas/ParadigmNotFound"}},"title":"Response Inflections Api Inflections Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/lemmatize":{"get":{"tags":["latin"],"summary":"Morpheus analyses","operationId":"lemmatize_api_lemmatize_get","parameters":[{"name":"word","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-zĀāĒēĪīŌōŪūȲȳÄäÖöËë\\-']{1,80}$","description":"One inflected Latin word form to analyze.","title":"Word"},"description":"One inflected Latin word form to analyze."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lemmatization"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Entry":{"properties":{"headword":{"type":"string","title":"Headword"},"part_of_speech":{"type":"string","title":"Part Of Speech","default":""},"entry_id":{"type":"string","title":"Entry Id","description":"Page title — feed to latin_get_inflections.","default":""},"word_class":{"type":"string","title":"Word Class","description":"POS section — feed to latin_get_inflections.","default":""},"senses":{"items":{"$ref":"#/components/schemas/Sense"},"type":"array","title":"Senses"},"source_url":{"type":"string","title":"Source Url","description":"The Wiktionary page this entry was adapted from (CC BY-SA 4.0).","readOnly":true}},"type":"object","required":["headword","source_url"],"title":"Entry","description":"One Latin entry on the page: the headword (page title) with one\npart-of-speech section's senses."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InflectionHandle":{"properties":{"entry_id":{"type":"string","title":"Entry Id","description":"Wiktionary page title — the lemma itself."},"word_class":{"type":"string","title":"Word Class","description":"Part-of-speech section, e.g. 'verb', 'noun'."},"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/LatinNominalParadigm"},{"$ref":"#/components/schemas/LatinVerbalParadigm"},{"$ref":"#/components/schemas/ParadigmNotFound"}],"discriminator":{"propertyName":"category","mapping":{"nominal":"#/components/schemas/LatinNominalParadigm","not_found":"#/components/schemas/ParadigmNotFound","verbal":"#/components/schemas/LatinVerbalParadigm"}}},{"type":"null"}],"title":"Forms","description":"The full paradigm, populated when a search is asked to include forms. None when not requested or beyond the cap."}},"type":"object","required":["entry_id","word_class"],"title":"InflectionHandle","description":"A structured anchor for fetching a full paradigm: feed ``entry_id`` (the page\ntitle) + ``word_class`` (the POS section) to ``latin_get_inflections`` — or ask\n``search`` to include the table inline (``forms``)."},"LatinNominalParadigm":{"properties":{"category":{"type":"string","const":"nominal","title":"Category","default":"nominal"},"entry_id":{"type":"string","title":"Entry Id"},"word_class":{"type":"string","title":"Word Class"},"found":{"type":"boolean","const":true,"title":"Found","default":true},"cases":{"additionalProperties":{"$ref":"#/components/schemas/NumberForms"},"type":"object","title":"Cases","description":"Case name (lower-case: 'nominative', 'genitive', …) → its singular/plural forms, in table order."},"source":{"type":"string","title":"Source","default":"Wiktionary, the free dictionary (en.wiktionary.org), Latin entries. Wikimedia Foundation. Text available under CC BY-SA 4.0; attribution and share-alike required when republishing. (CC BY-SA 4.0: https://creativecommons.org/licenses/by-sa/4.0/) Adapted: reformatted and condensed from the original."}},"type":"object","required":["entry_id","word_class","cases"],"title":"LatinNominalParadigm","description":"Declension of a noun/adjective/etc.: case → {singular, plural}.\n\n``category`` discriminates this from the verbal and not-found shapes — switch on\nit before reading the body."},"LatinVerbalParadigm":{"properties":{"category":{"type":"string","const":"verbal","title":"Category","default":"verbal"},"entry_id":{"type":"string","title":"Entry Id"},"word_class":{"type":"string","title":"Word Class"},"found":{"type":"boolean","const":true,"title":"Found","default":true},"finite":{"additionalProperties":{"additionalProperties":{"type":"string"},"type":"object"},"type":"object","title":"Finite","description":"'<voice> <mood> <tense>' (lower-case, e.g. 'active indicative present') → person/number ('first singular' … 'third plural') → the form. Periphrastic rows (e.g. passive perfect) appear under the single key 'all'. Alternates are comma-separated; an em-dash cell (no such form) is omitted."},"nonfinite":{"additionalProperties":{"additionalProperties":{"type":"string"},"type":"object"},"type":"object","title":"Nonfinite","description":"Non-finite section ('infinitive', 'participle', 'gerund', 'supine') → label ('active present', 'genitive', …) → the form."},"source":{"type":"string","title":"Source","default":"Wiktionary, the free dictionary (en.wiktionary.org), Latin entries. Wikimedia Foundation. Text available under CC BY-SA 4.0; attribution and share-alike required when republishing. (CC BY-SA 4.0: https://creativecommons.org/licenses/by-sa/4.0/) Adapted: reformatted and condensed from the original."}},"type":"object","required":["entry_id","word_class","finite","nonfinite"],"title":"LatinVerbalParadigm","description":"Conjugation of a verb, grouped the way Wiktionary's table is:\nfinite cells keyed by \"<voice> <mood> <tense>\" → person/number → form, plus the\nnon-finite sections (infinitives, participles, gerund, supine)."},"Lemmatization":{"properties":{"word":{"type":"string","title":"Word"},"found":{"type":"boolean","title":"Found"},"analyses":{"items":{"$ref":"#/components/schemas/MorphAnalysis"},"type":"array","title":"Analyses"},"source":{"type":"string","title":"Source","default":"Morpheus morphological analyses via the Perseids Project morphology service (morph.perseids.org), Tufts University / Perseus Digital Library."}},"type":"object","required":["word","found"],"title":"Lemmatization","description":"The result of lemmatizing one word form via Morpheus."},"MorphAnalysis":{"properties":{"lemma":{"type":"string","title":"Lemma"},"part_of_speech":{"type":"string","title":"Part Of Speech","default":""},"tags":{"additionalProperties":{"type":"string"},"type":"object","title":"Tags"},"source":{"type":"string","title":"Source","default":"Morpheus morphological analyses via the Perseids Project morphology service (morph.perseids.org), Tufts University / Perseus Digital Library."}},"type":"object","required":["lemma"],"title":"MorphAnalysis","description":"One Morpheus analysis of an inflected form: its lemma plus the grammatical\ntags the analyzer assigned (mood/tense/case/number/…, whatever applies)."},"NumberForms":{"properties":{"singular":{"type":"string","title":"Singular"},"plural":{"type":"string","title":"Plural"}},"type":"object","required":["singular","plural"],"title":"NumberForms","description":"A declension cell: the two number forms of one case. Latin forms are verbatim\n(macrons preserved); alternates stay space-separated as Wiktionary renders them."},"ParadigmNotFound":{"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), Latin entries. Wikimedia Foundation. Text available under CC BY-SA 4.0; attribution and share-alike required when republishing. (CC BY-SA 4.0: https://creativecommons.org/licenses/by-sa/4.0/) Adapted: reformatted and condensed from the original."}},"type":"object","required":["entry_id","word_class"],"title":"ParadigmNotFound","description":"No inflection table for this page/POS (no Latin section, no table, or the\npage doesn't exist). ``found`` is False and there is no table body."},"SearchLanguage":{"type":"string","enum":["lat","eng"],"title":"SearchLanguage","description":"The query language. ``lat`` looks a Latin word up directly (any of its forms —\nan inflected query resolves via the form index or Morpheus). ``eng`` searches in\nreverse: the English Wiktionary page for the query word lists per-sense Latin\ntranslations, and each distinct Latin lemma 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 Latin translations were found — entries may still be empty when none of them could be expanded (see translations)."},"handles":{"items":{"$ref":"#/components/schemas/InflectionHandle"},"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 table 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 lat): the Latin terms each English sense translates to, in sense order. Entries/handles below are the expanded dictionary entries of those terms."},"translations_truncated":{"type":"integer","title":"Translations Truncated","description":"How many distinct translated 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","morpheus","translations"],"title":"Search Method","description":"How the match was found: 'direct' = the query itself matched; 'lemma_index' = an inflected form resolved via a previously cached paradigm; 'morpheus' = resolved via the Morpheus morphological analyzer; 'translations' = an English query resolved via Wiktionary translation tables.","default":"direct"},"resolved_from":{"type":"string","title":"Resolved From","description":"The query whose lemma this result names (paired with resolved_lemma); else empty. lat queries only (always empty for eng). Set both when an inflected miss was re-searched (search_method lemma_index/morpheus) and when the query's own page is a form-of stub returned directly (search_method stays 'direct').","default":""},"resolved_lemma":{"type":"string","title":"Resolved Lemma","description":"The lemma this query maps to; else empty. lat queries only. With search_method 'lemma_index'/'morpheus' the entries below ARE this lemma's; with 'direct' the entries are the queried form-of stub and this names the lemma whose page holds the full paradigm (search it / latin_get_inflections it). Only set when unambiguous — a form mapping to several lemmas leaves it empty (use lemmatize); the per-sense form_of still carries each.","default":""},"source":{"type":"string","title":"Source","default":"Wiktionary, the free dictionary (en.wiktionary.org), Latin entries. Wikimedia Foundation. Text available under CC BY-SA 4.0; attribution and share-alike required when republishing. (CC BY-SA 4.0: https://creativecommons.org/licenses/by-sa/4.0/) Adapted: reformatted and condensed from the original."}},"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"},"form_of":{"type":"string","title":"Form Of","description":"When this sense is a non-lemma inflected form ('accusative singular of aqua'), the lemma it inflects from — its Wiktionary page title, ready to search or feed to latin_get_inflections for the full paradigm. Empty for an ordinary gloss.","default":""}},"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 sense gloss the source table carries."},"terms":{"items":{"$ref":"#/components/schemas/TranslationTerm"},"type":"array","title":"Terms"}},"type":"object","required":["sense"],"title":"TranslationSense","description":"One English sense (a translations table) and the Latin terms it offers."},"TranslationTerm":{"properties":{"word":{"type":"string","title":"Word","description":"Wiktionary page title — the lemma itself."},"display":{"type":"string","title":"Display","description":"Rendered form when it differs from the title (macrons).","default":""},"gender":{"type":"string","title":"Gender","description":"Grammatical gender as marked, e.g. 'f'.","default":""},"qualifier":{"type":"string","title":"Qualifier","description":"Usage qualifier as marked, e.g. 'poetic'; else empty.","default":""}},"type":"object","required":["word"],"title":"TranslationTerm","description":"One Latin word a translations table offers for an English sense. ``word`` is\nthe Wiktionary page title (what an ``eng`` search re-searches and what\n``latin_get_inflections`` needs); ``display`` keeps the rendered text only when it\ndiffers (macrons: title 'uvidus' renders as 'ūvidus')."},"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"}}}}