cedarlaw

v0.1.0
io.github.CloudCorpRecords/cedarlaw Checked 2 days ago Published 16 days ago

Lebanese legislation corpus: laws, articles, rulings and Gazette issues, verbatim.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

search_legislation

Search Lebanese legislation (laws, decrees, decisions), their articles, court rulings, or Official Gazette issues, by keyword: Arabic words, French words (articles the Centre published in French, and the codes' French or English names), or a law's numeric id. Returns verbatim snippets from the Lebanese University's database, never an AI-written summary. A ruling hit's pdf_url is its full judgment's scan on the Lebanese University's site: always pass it on with any answer that cites the ruling. English words work too: they are read into Arabic through a glossary, matched against the unofficial…

ParameterTypeDescription
query *stringwords to search for, Arabic, English or French, or a law's id
kindstringnarrow to one category; omit to search all four
limitintegerresults per category, at most 20
yearintegeronly laws issued this year; for the gazette category, only issues published this year

get_law

Get a law, decree or similar text's metadata (kind, number, date, status), its table of contents (the chapters: id, parent_id, depth, heading), its articles in order (number, and the section_id of the chapter each sits under) and the texts it amended or was amended by (amended_by / amended: one entry per text and relation, with articles listing the articles of this law it touches, or of the other law for amended; no articles means the whole law). Use get_article to read one article's verbatim text, or get_law_texts to read all of them. title_en is an unofficial English title (a model's renderi…

ParameterTypeDescription
id *integerthe law's numeric id, from search_legislation or its URL

get_article

Get one article's verbatim Arabic text as in force today (and French, when the Centre published it and no amendment has replaced it), its in-force status, amendment history, and the canonical and source URLs. When an amendment replaced the wording, text_ar is the new wording and centre_text_ar the earlier one the Centre's site still shows. centre_error, when present, notes an error in the Centre's own text (one article repeating another, a stray letter); the text itself is left as published. The text is copied exactly from the database; nothing here is AI-written. Laws with ids from 2000000000…

ParameterTypeDescription
law_id *integerthe law's id (see get_law)
number *stringthe article's printed number, e.g. "212", "12 مكرر" or "586-1" (an article numbered under another; "586 (1)" works too)

get_law_texts

Get the verbatim texts of a law's articles in order, a page at a time: for each article its number, section_id, note, and the same text fields as get_article (text_ar in force today, text_fr, centre_text_ar when an amendment replaced the wording, version, repealed). Follow next_offset until it is absent to read the whole law. Amendment history stays in get_article. Not legal advice.

ParameterTypeDescription
law_id *integerthe law's numeric id
limitintegerarticles per page, at most 200
offsetintegerhow many articles to skip (next_offset of the previous page)

get_ruling

Get one court ruling (judgment) by id: court, number, date, panel, and its verbatim text when the Centre holds it as typed text. When available, pages returns the scanned judgment's machine reading, with low_confidence: true on hard-to-read pages where errors are expected. pdf_url is the full judgment's scan on the Lebanese University's site: always give it to the user with any answer about the ruling, so they can open the original. Not legal advice.

ParameterTypeDescription
id *integerthe ruling's numeric id, from search_legislation

get_gazette_issue

Get one Official Gazette issue by id: its number, publication date, and the laws, decrees and decisions it published. Not legal advice.

ParameterTypeDescription
id *integerthe issue's numeric id, from search_legislation

list_legislation

List laws, decrees and decisions by date, newest first: for "everything published since January 2025" call with since "2025-01". The date is the publication date: the Official Gazette date, else the issue date (each entry's date, with gazette_number, gazette_date and gazette_issue_id). Recent texts come from machine readings of Gazette scans (ids from 2000000000, unofficial) because the Lebanese University's Centre lags about a year, so a recent period lists mostly those. since and until accept YYYY, YYYY-MM or YYYY-MM-DD, inclusive. kind narrows to one kind, in Arabic ("قانون", "مرسو…

ParameterTypeDescription
kindstringthe kind of text, Arabic or English (e.g. "قانون" or "Law", "Decree")
limitintegertexts per page, at most 100
offsetintegerhow many texts to skip (next_offset of the previous page)
orderstringby publication date
sincestringfirst date, inclusive: YYYY, YYYY-MM or YYYY-MM-DD (e.g. "2025-01")
untilstringlast date, inclusive: YYYY, YYYY-MM or YYYY-MM-DD

list_gazette_issues

List Official Gazette issues by publication date, newest first, with the number of texts each carries (text_count) and where the issue comes from: source "centre" (the Lebanese University's Centre, whose issues stop about a year back) or "scans" (issues seen in Gazette scans, ids from 2000000000, which cover recent months). since and until accept YYYY, YYYY-MM or YYYY-MM-DD, inclusive; "everything since January 2025" is since "2025-01". Page with offset and next_offset. get_gazette_issue reads one issue's texts. Not legal advice.

ParameterTypeDescription
limitintegerissues per page, at most 100
offsetintegerhow many issues to skip (next_offset of the previous page)
orderstringby publication date
sincestringfirst date, inclusive: YYYY, YYYY-MM or YYYY-MM-DD
untilstringlast date, inclusive: YYYY, YYYY-MM or YYYY-MM-DD

possibly_affected

Get the general repeals that may touch a law: earlier texts with a "all provisions contrary to this law are repealed" clause pointing at it. A list to check, never a finding that anything was actually repealed. Not legal advice.

ParameterTypeDescription
law_id *integerthe law's numeric id