{"openapi":"3.1.0","info":{"title":"Old English dictionary access","version":"2.1.0"},"paths":{"/api/health":{"get":{"tags":["anglo"],"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":["anglo"],"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":["anglo"],"summary":"Look an Old English 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. ang (default): a single Old English word — any form; an inflected form is resolved to its lemma via cached paradigms (see search_method in the response); diacritics are optional once a paradigm is cached ('thing' finds þing, 'waeter' finds wæter). eng: the English word whose Old English equivalents you want — multiword entries like 'apple tree' work.","title":"Query"},"description":"The word to look up. ang (default): a single Old English word — any form; an inflected form is resolved to its lemma via cached paradigms (see search_method in the response); diacritics are optional once a paradigm is cached ('thing' finds þing, 'waeter' finds wæter). eng: the English word whose Old English equivalents you want — multiword entries like 'apple tree' work."},{"name":"search_language","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SearchLanguage","description":"Query language: ang looks the Old English word up directly; eng finds an English word's per-sense Old English equivalents (the translations block) and expands them into full entries.","default":"ang"},"description":"Query language: ang looks the Old English word up directly; eng finds an English word's per-sense Old English 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":["anglo"],"summary":"Inflection table","operationId":"inflections_api_inflections_get","parameters":[{"name":"entry_id","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-zĀāĒēĪīŌōŪūȲȳǢǣĠġĊċÆæÞþÐðǷƿŒœ][A-Za-zĀāĒēĪīŌōŪūȲȳǢǣĠġĊċÆæÞþÐðǷƿŒœ\\-']{0,79}$","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","minLength":1,"maxLength":24,"pattern":"^[a-z ]+$","description":"Part-of-speech section from a handle, e.g. verb, noun.","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/AngloNominalParadigm"},{"$ref":"#/components/schemas/AngloVerbalParadigm"},{"$ref":"#/components/schemas/ParadigmNotFound"}],"discriminator":{"propertyName":"category","mapping":{"nominal":"#/components/schemas/AngloNominalParadigm","verbal":"#/components/schemas/AngloVerbalParadigm","not_found":"#/components/schemas/ParadigmNotFound"}},"title":"Response Inflections Api Inflections Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/romanize":{"get":{"tags":["anglo"],"summary":"Romanize Old English to clean ASCII","operationId":"romanize_api_romanize_get","parameters":[{"name":"text","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":4000,"description":"Old English text to reduce to its primary ASCII spelling (þing→thing, wæter→waeter; macrons and dotted ġ/ċ dropped).","title":"Text"},"description":"Old English text to reduce to its primary ASCII spelling (þing→thing, wæter→waeter; macrons and dotted ġ/ċ dropped)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Romanization"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/deromanize":{"get":{"tags":["anglo"],"summary":"Find the Old English word(s) matching an ASCII spelling","operationId":"deromanize_api_deromanize_get","parameters":[{"name":"text","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":4000,"description":"ASCII-spelled Old English text. Returns attested dictionary spellings whose romanization matches (source=dictionary); on a miss, a single best-effort reconstruction (source=reconstruction, approximate=true) — Old English romanization is deeply lossy, so the dictionary hit is the reliable answer. Coverage grows as words are cached.","title":"Text"},"description":"ASCII-spelled Old English text. Returns attested dictionary spellings whose romanization matches (source=dictionary); on a miss, a single best-effort reconstruction (source=reconstruction, approximate=true) — Old English romanization is deeply lossy, so the dictionary hit is the reliable answer. Coverage grows as words are cached."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deromanization"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AngloNominalParadigm":{"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/AngloNumberForms"},"type":"object","title":"Cases","description":"Case key (lower-case: 'nominative', 'genitive', 'instrumental', …) → its singular/dual/plural forms, in table order. Adjectives prefix the declension class and suffix the gender ('strong nominative feminine'); pronouns prefix the person and, in the third person, the gender ('first person nominative', 'third person masculine accusative'). ``dual`` is populated only on pronoun cells."},"source":{"type":"string","title":"Source","default":"Wiktionary, the free dictionary (en.wiktionary.org), Old English 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","cases"],"title":"AngloNominalParadigm","description":"Declension of a noun/adjective/pronoun: case key → {singular, dual, plural}.\n\nNoun tables are plain: the bare case is the key ('nominative', 'genitive',\n'instrumental'). Adjective tables split by gender (suffixed: 'nominative\nfeminine') and come one per declension class (strong/weak), folded in as a\ntitle-derived prefix: 'strong nominative feminine', 'weak dative neuter'.\nThe personal-pronoun table splits by person (and, in the third person, gender)\nand carries the dual: 'first person nominative' → {singular, dual, plural},\n'third person masculine accusative' → {singular, …, plural}. ``category``\ndiscriminates this from the verbal and not-found shapes — switch on it before\nreading the body."},"AngloNumberForms":{"properties":{"singular":{"type":"string","title":"Singular","default":""},"dual":{"type":"string","title":"Dual","default":""},"plural":{"type":"string","title":"Plural","default":""}},"type":"object","title":"AngloNumberForms","description":"A declension cell: the number forms of one case key. Forms are verbatim\nnormalized Old English; alternates stay comma-separated as Wiktionary renders\nthem. A number the table doesn't give is an empty string — ``dual`` is filled\nonly by the personal-pronoun paradigm (nouns and adjectives have no dual)."},"AngloVerbalParadigm":{"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":"Mood and tense (lower-case: 'indicative present', 'subjunctive past'; the imperative has no tense — its key is just 'imperative') → person and number ('first singular' … 'third singular', and the bare 'singular'/'plural' the subjunctive and imperative use) → the form. 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 form ('infinitive', 'inflected infinitive', 'present participle', 'past participle') → {'form': <the form>}."},"source":{"type":"string","title":"Source","default":"Wiktionary, the free dictionary (en.wiktionary.org), Old English 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","finite","nonfinite"],"title":"AngloVerbalParadigm","description":"Conjugation of a verb, grouped the way Wiktionary's tables are: finite cells\nkeyed by mood and tense → person-and-number → form, plus the non-finite forms\n(the two infinitives and the participles). Old English verbs are active only —\nthere is no mediopassive voice — so all finite keys are bare."},"Candidate":{"properties":{"word":{"type":"string","title":"Word","description":"A real orthographic word (source=dictionary) or the best-effort reconstruction (source=reconstruction)."},"source":{"type":"string","enum":["dictionary","reconstruction"],"title":"Source","description":"dictionary = an ATTESTED spelling recalled from the dictionary index (exact, no guessing); reconstruction = a best-effort algorithmic guess, returned only when no attested word matched (never emitted by Interslavic transliterate, which returns empty on a miss instead)."},"kind":{"anyOf":[{"type":"string","enum":["lemma","form"]},{"type":"null"}],"title":"Kind","description":"For a lossy-family dictionary candidate, whether the word is a headword (lemma) or an inflected form. None for a reconstruction, and always None for Interslavic transliterate (which does not distinguish lemma from form)."}},"type":"object","required":["word","source"],"title":"Candidate","description":"One candidate spelling from a reverse-lookup surface (deromanize /\ndetransliterate, or Interslavic transliterate)."},"Deromanization":{"properties":{"original":{"type":"string","title":"Original","description":"The romanized text as given."},"candidates":{"items":{"$ref":"#/components/schemas/Candidate"},"type":"array","title":"Candidates","description":"Real spellings whose romanization matches the query (source=dictionary), in a deterministic — NOT confidence-ranked — order; equally-valid readings of the ambiguous key. Bounded by cached vocabulary, so NOT guaranteed exhaustive: a real word not yet fetched won't appear, and the same query may return a reconstruction before a word is cached and a dictionary hit after."},"approximate":{"type":"boolean","title":"Approximate","description":"True when the only candidate is a best-effort reconstruction (no attested word matched); False when candidates are attested dictionary spellings."}},"type":"object","required":["original","candidates","approximate"],"title":"Deromanization","description":"The API-facing payload: the query plus its candidate real spellings."},"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 anglo_get_inflections.","default":""},"word_class":{"type":"string","title":"Word Class","description":"POS section — feed to anglo_get_inflections.","default":""},"senses":{"items":{"$ref":"#/components/schemas/Sense"},"type":"array","title":"Senses"}},"type":"object","required":["headword"],"title":"Entry","description":"One Old English 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/AngloNominalParadigm"},{"$ref":"#/components/schemas/AngloVerbalParadigm"},{"$ref":"#/components/schemas/ParadigmNotFound"}],"discriminator":{"propertyName":"category","mapping":{"nominal":"#/components/schemas/AngloNominalParadigm","not_found":"#/components/schemas/ParadigmNotFound","verbal":"#/components/schemas/AngloVerbalParadigm"}}},{"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 ``anglo_get_inflections`` — or ask\n``search`` to include the table inline (``forms``)."},"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), Old English 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":"ParadigmNotFound","description":"No inflection table for this page/POS (no Old English section, no table, or\nthe page doesn't exist). ``found`` is False and there is no body."},"Romanization":{"properties":{"original":{"type":"string","title":"Original","description":"The Old English text as given."},"text":{"type":"string","title":"Text","description":"The primary ASCII spelling."}},"type":"object","required":["original","text"],"title":"Romanization","description":"Old English text reduced to its primary ASCII spelling (þing→thing, wæter→waeter;\nmacrons and the dotted ġ/ċ dropped) for an ASCII-keyboard downstream."},"SearchLanguage":{"type":"string","enum":["ang","eng"],"title":"SearchLanguage","description":"The query language. ``ang`` looks an Old English word up directly (any of\nits forms — an inflected query resolves via cached paradigms). ``eng`` searches\nin reverse: the English Wiktionary page for the query word lists per-sense Old\nEnglish translations, and each distinct 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 Old English 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 ang): the Old English 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","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; 'translations' = an English query resolved via Wiktionary translation tables.","default":"direct"},"resolved_from":{"type":"string","title":"Resolved From","description":"The original inflected query when resolved; else empty. ang queries only — always empty for eng results.","default":""},"resolved_lemma":{"type":"string","title":"Resolved Lemma","description":"The lemma actually searched when resolved; else empty. ang queries only — always empty for eng results.","default":""},"source":{"type":"string","title":"Source","default":"Wiktionary, the free dictionary (en.wiktionary.org), Old English 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 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 Old English 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.","default":""},"gender":{"type":"string","title":"Gender","description":"Grammatical gender as marked, e.g. 'n'.","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 Old English word a translations table offers for an English sense.\n``word`` is the Wiktionary page title (what an ``eng`` search re-searches and\nwhat ``anglo_get_inflections`` 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"}}}}