cedarlaw
v0.1.0Lebanese 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…
| Parameter | Type | Description |
|---|---|---|
query * | string | words to search for, Arabic, English or French, or a law's id |
kind | string | narrow to one category; omit to search all four |
limit | integer | results per category, at most 20 |
year | integer | only 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…
| Parameter | Type | Description |
|---|---|---|
id * | integer | the 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…
| Parameter | Type | Description |
|---|---|---|
law_id * | integer | the law's id (see get_law) |
number * | string | the 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.
| Parameter | Type | Description |
|---|---|---|
law_id * | integer | the law's numeric id |
limit | integer | articles per page, at most 200 |
offset | integer | how 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.
| Parameter | Type | Description |
|---|---|---|
id * | integer | the 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.
| Parameter | Type | Description |
|---|---|---|
id * | integer | the issue's numeric id, from search_legislation |
get_links
Get the graph edges into or out of one item: a law, an article, a ruling, an opinion, a research study or a Gazette issue. Use this to walk citations and amendments directly, instead of only what get_law and get_article attach automatically. For a law key ("law/<id>") the default scope "all" includes the edges of its articles too (each link keeps its real to_key, e.g. "law/244611/art/37"); scope "law" is the law itself only. Newest first by the date of the text each edge comes from; page with offset and next_offset, total is the number of edges. Not legal advice.
| Parameter | Type | Description |
|---|---|---|
key * | string | the item's key: "law/<id>", "law/<id>/art/<number>", "ruling/<id>", "opinion/<id>", "research/<id>" or "gazette/<id>" |
direction | string | "to" (edges that name this item as their target) or "from" (edges this item itself carries) |
limit | integer | at most this many edges. quote is cut to 600 characters when longer (quote_truncated: true); get_article has the full wording |
offset | integer | how many edges to skip (next_offset of the previous page) |
order | string | by the date of the text the edge comes from (Gazette date, else issue date) |
relation | string | narrow to one relation (e.g. "cites", "amend", "repeal"); omit for all |
scope | string | for a law key only: "all" (default) adds the edges to or from its articles, "law" is the law itself only |
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 ("قانون", "مرسو…
| Parameter | Type | Description |
|---|---|---|
kind | string | the kind of text, Arabic or English (e.g. "قانون" or "Law", "Decree") |
limit | integer | texts per page, at most 100 |
offset | integer | how many texts to skip (next_offset of the previous page) |
order | string | by publication date |
since | string | first date, inclusive: YYYY, YYYY-MM or YYYY-MM-DD (e.g. "2025-01") |
until | string | last 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.
| Parameter | Type | Description |
|---|---|---|
limit | integer | issues per page, at most 100 |
offset | integer | how many issues to skip (next_offset of the previous page) |
order | string | by publication date |
since | string | first date, inclusive: YYYY, YYYY-MM or YYYY-MM-DD |
until | string | last 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.
| Parameter | Type | Description |
|---|---|---|
law_id * | integer | the law's numeric id |