Merit — Ukrainian Law & Registers

v1.0.4
legal.merit/law Checked 2 days ago Published 28 days ago

50+ Ukrainian legal sources, 120+ tools: laws on any date, case law, courts, companies, sanctions.

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

ua_law__search_units Search Legislation Provisions by Text

Find provisions by their text: which articles, points or clauses say X. Every word of `text` must appear (quote it for an exact phrase). Searches the text as published on `on_date` (default today); `nreg` limits it to acts. Each hit is the smallest unit holding it, with that day's `urn`. ⟦ ⟧ in `excerpt` mark matches, not the law's text. `amending_act` hits restate other acts. `search` finds acts by title.

ParameterTypeDescription
text *stringWords to find.
amending_actsbooleanFalse: no amending laws.
limitinteger
nregarrayOnly these acts.
offsetinteger
on_datestringText as published that day.
per_actintegerHits per act, 0: all (default 3; 1 act: all).

ua_law__get_document Get Legal Act Card

One act's card, by registration number. No text: use `get_document_toc` then `get_unit_fulltext`. `urn_current_edition` is null unless an edition is in force today -- a repealed act has none; `urn_latest_edition` is the newest text in effect today whatever the status; `urn_next_edition`, text scheduled to take effect later. Editions '30000101' and up await a date not yet fixed (e.g. end of martial law) and are none of these.

ParameterTypeDescription
nreg *stringRegistration number, e.g. 168/97-вр.
offsetinteger
relationstringA `relation_counts` name: list those acts, 50 a page.

ua_law__get_unit Get Legal Provision Metadata

Metadata for one structural unit, addressed by its URN. `urn` is 'urn:ua:law:{nreg}:{path}@{YYYYMMDD}'. Drop '@{YYYYMMDD}' for today's edition; drop the path too for the whole document. Take one from a filtered `get_document_toc` rather than building it. A URN resolving to no unit answers 'not_found' with the nearest real units either side and `same_segment` -- real paths ending in the segment asked for, the hint when the right article was guessed under a wrong ancestor.

ParameterTypeDescription
urn *stringUnit URN, from get_document_toc.

ua_law__get_unit_in_force Check Provision In Force on Date

Whether one unit was legally in force on a given date. `in_force` is true, false, or null when the corpus cannot tell. `outcome` 'deterministic' is from the portal's own events or edition history, anything else from AI review of the text. An undated URN asks about the provision; a dated one about that version of its text: false once replaced (`scope` 'version', `version_in_force_urn`). `decided_for_provision` false: the answer is the act's, possibly wrong for an article inserted or deleted mid-life. `source: 'no_force_event'`: none ever recorded -- read `document_status_name`.

ParameterTypeDescription
date *stringDay to test.
urn *stringUnit URN, from get_document_toc.

ua_law__get_unit_fulltext Get Legal Provision Text

Unit text, paged. `truncated`: not the whole unit; `next_cursor` (none on the last page) is the `cursor` for more. Pages end after a paragraph, else a space, else mid-word (a tiny `max_chars`). Only page 1 lists `parts`, sub-units with their own `urn`, unless `parts_offset` is passed. `text: null` with status 'edition_text_unavailable' (edition not stored) or 'extraction_failed' (unit not cut out) is a unit that DOES exist -- not a repeal. No unit at that address answers 'not_found'. `text_since`: the edition this text first reads so; `edition_date` only dates the act's latest change.

ParameterTypeDescription
urn *stringUnit URN, from get_document_toc.
cursorstringA `next_cursor`.
max_charsintegerPage size; 0: `parts` only.
parts_offsetintegerStart of `parts`.

ua_law__get_units_fulltext Get Several Legal Provisions' Text

Several units' text in one call: a norm and what it relies on. `units` answers each URN in order as `get_unit_fulltext` would, sharing one `max_chars`: a unit that does not fit is `truncated` with a `next_cursor`, and units past the budget come back with no text. A URN matching nothing is its own 'not_found' entry.

ParameterTypeDescription
urns *arrayUnit URNs, answered in this order.
max_charsintegerPage size; 0: `parts` only.

ua_law__get_unit_editions List Provision Editions

The editions on which one unit's text changed, and what changed it. Each entry is a version: its dated `urn`, how many editions kept it, and `amended_by`, the acts behind the change ('unit_notes': cited by the unit's notes; 'edition_basis': the edition's basis). `removed`: the unit disappears; `moved_from`: its address changed (`text_changed` false if only that). A `baseline` opens the list: the first text, or with `from_date` the text in force that day. Edition '30000101' and up (`edition_date` null) takes effect on a date not yet fixed. `complete: false` means `limit` cut older entries.

ParameterTypeDescription
urn *stringUnit URN, from get_document_toc.
from_datestringEarliest edition, inclusive.
limitintegerEditions to read text for, newest first.
to_datestringLatest edition, inclusive.

ua_law__get_document_toc Get Legal Act Contents

One document's units in reading order -- and the article resolver: `kind='article'` with `number='626'` returns that article alone, `urn` included. Structure only. Each entry carries the `urn` `get_unit_fulltext` takes and a `heading`, or for a clause its opening paragraph as `lead_text` with `text_chars` for the provision's full length. Filter, do not page: the Civil Code is 5,431 units, 1,329 of them articles.

ParameterTypeDescription
nreg *stringRegistration number, e.g. 168/97-вр.
edition_datestringEdition id from a URN's @suffix. Omit for current.
kindstringOne unit kind: annex, article, chapter, clause, document, par_group, part, sub_clause, sub_point, subpart.
limitinteger
numberstringUnit's printed number, e.g. 626.
offsetinteger

ua_edrsr__get_document Get Court Decision (EDRSR)

One decision: its text, its citations, its structural parts. Text is windowed, never dumped whole. `text_window` says what came back and how to get the rest. Citations cover that window only, with `*_outside_window` counting the rest; repeats of one case roll up into `occurrences`. Citations carry what was written and what it resolved to, so an unresolved one stays visible. Join on `resolved_cause_num`, not the written number. `case_citations` are what this decision cites. Text near a citation is this court's reasoning, not the cited court's.

ParameterTypeDescription
doc_id *integerDocument id.
include_htmlbooleanAlso return canonical HTML (tables, emphasis, superscripts the text flattens). Always whole: the window cuts text, which offsets index.
max_charsintegerCap on returned text characters; text_window.next_offset continues.
offsetintegerCharacters to skip, for paging.
sectionarrayParts to return text for: preamble, reasoning (what the court found), operative (what it ordered). Omit for all.

ua_edrsr__get_court_practice Court Practice on a Statute Article

Court practice on one statute article: which cases cite it, by court and year, ranked highest authority first. Spellings of one code answer alike ('ККУ', 'КК України') and mean the code in force; `repealed_excluded` lists repealed namesakes' nregs. `index_coverage.status` says what `total_cases` means (a real zero, or unresolved citations); under `index_unavailable` it is null, not a count.

ParameterTypeDescription
abbreviation *stringCode abbreviation (ККУ), or act nreg or title.
article_number *stringArticle number as written, e.g. 185.
clause_componentstringЧастина/пункт; narrows to clause-depth citations.
facet_sizeintegerMax facet buckets to return (1-1000).
limitintegerMax rows to return (0-200); 0 returns the count alone.

ua_edrsr__lookup_case Look Up Court Case (EDRSR)

One case by document id or case number, with the cases related to it. Give exactly one of `doc_id` or `cause_num`. Metadata only, no reasoning text: what a court held comes from `get_document`. Highest instance first, judgments before rulings, newest first. `related_cases` is citation-graph overlap, never semantic similarity or a judgement on merits, and may repeat a decision from `matches`. `score` weights each shared anchor and case by rarity, so boilerplate ranks near nothing. `departures`/`departed_by`: Supreme Court departures read from the texts.

ParameterTypeDescription
cause_numstringCase number. Cyrillic case variants all match.
doc_idintegerDocument id.
match_limitintegerMax decisions per case to return (1-25).
max_charsintegerCap on response characters; related-case evidence fits it.
offsetinteger
related_limitintegerMax rows to return (0-200); 0 returns the count alone.

ua_bankruptcy__get_case Get Bankruptcy Case

One bankruptcy case's announcement history and current procedural stage, newest first. `current_stage` is the most recent announcement's type. The registry publishes no case-level status record, so the latest publication is the only statement of where the case stands, and `debtor_code`, `debtor_name` and `court_name` are read off that same announcement. Check `mirror.ready` to tell "no proceedings published" apart from an unsynced mirror.

ParameterTypeDescription
case_number *stringExact case number, slashes included.
limitinteger

ua_debtors__lookup Look Up Debtors by Proceeding

Every debtor listed under one enforcement-proceeding number. Always a list: one proceeding can be enforced against several debtors, so a number legitimately has several answers.

ParameterTypeDescription
proceeding_number *stringEnforcement-proceeding number, e.g. 71234567.

ua_edr_companies__lookup Look Up Company (EDR)

One legal entity by ЄДРПОУ code or `record`, with its people. `people`: founders, beneficial owners, signers and board members; the head is the latest appointment. `company` adds termination, bankruptcy, succession, branches and tax registration. `history`: changes per weekly release since tracking began; `on_date`: people then. Earlier history: paid НАІС extract only. A code shared by several subjects returns the live one, the rest in `other_subjects`. No address or КВЕД codes upstream.

ParameterTypeDescription
edrpoustringЄДРПОУ code, e.g. 00032129.
historybooleanAdd the change log.
on_datestringAdd people as of this date.
recordintegerЄДР subject id, from a hit.

ua_edr_companies__search_fop Search Sole Traders (EDR)

ФОП (фізичні особи-підприємці) in the open ЄДР extract, by name (ПІБ), status and registration/termination date. Ordered by the filtered date, else `record`. No РНОКПП, address or КВЕД upstream: namesakes cannot be told apart, so a name hit alone does not identify a person.

ParameterTypeDescription
limitinteger
offsetinteger
qstringWords of the ПІБ; each a prefix, all required.
registered_fromstringYYYY-MM-DD, inclusive.
registered_tostring
statusstringCanonical registration status.
terminated_fromstring
terminated_tostring

ua_edr_companies__lookup_fop Look Up Sole Trader (EDR)

One ФОП by `record`: termination entry and reason, annulled termination, farm-household flag, property manager, tax/ЄСВ registration.

ParameterTypeDescription
record *integerЄДР subject id, from a search_fop hit.
historybooleanAdd the change log.

ua_enforcement_proceedings__lookup Look Up Enforcement Proceeding

Every row published under one enforcement-proceeding number. Always a list: a proceeding with several debtors is published as one row per debtor. `matches` is capped at 200.

ParameterTypeDescription
vp_num *stringProceeding number, e.g. 71234567.

ua_echr__get_case Get ECHR Document (HUDOC)

One HUDOC document by `itemid`, adding cited Strasbourg case law, domestic law at issue, judges.

ParameterTypeDescription
itemid *stringHUDOC item id from a search hit, e.g. '001-219403'.

ua_nbu_rate__rate Get NBU Exchange Rate

Look up the National Bank of Ukraine's official exchange rate (UAH per unit) for a currency, as of a given date or today if none is given. Supports historical dates for ЦК §533 п.2-style currency-conversion calculations, not only the current rate. Returns `available: false` with a null rate, rather than an error, when NBU has nothing published for the requested currency or date.

ParameterTypeDescription
currency *stringISO 4217 alphabetic code, e.g. USD.
datestringYYYY-MM-DD. Defaults to today (Kyiv) when omitted.

ua_vs_digest__document Get Supreme Court Practice Review

One Supreme Court publication's extracted text, `document_url`, cited case numbers and linked ЄДРСР `edrsr_ids` -- only this tool returns them. These are analytical reports, not judgments, averaging ~128,000 characters, so a window from the start is usually cover page and contents. Pass `text_query` to open it at the passage you want. `char_count` is the full length; `has_more` whether more follows. `extract_status` says why there is no text: `empty` is a scan with no OCR layer, one in nine; `failed` errored; `unsupported` is not a PDF.

ParameterTypeDescription
document_id *stringFrom a search result.
text_limitintegerCharacters to return. Pass 1 for metadata and `case_refs` without the text.
text_offsetinteger0-based character offset into the text.
text_querystringOpen the window at this term, searching from `text_offset`; pass the last window's end for the next hit.

ua_holidays__check_date Check Ukrainian Holiday

Whether one date is a public holiday or non-working day in Ukraine. `is_holiday` is true, false, or **null** -- null when `covered` is false, i.e. the mirror has not computed that year. Null is not "no": a deadline calculation must be able to tell "this is a working day" from "this source cannot say". `matches` carries the day with its name and verbatim statute line; a list, as a movable feast and a dated holiday can coincide. `is_holiday` means ст. 73 lists the day. During martial law ст. 73 does not apply: see `martial_law.suspends_holidays`, null past the decreed end.

ParameterTypeDescription
date *stringISO date, YYYY-MM-DD.

ua_lpd__position Get Supreme Court Legal Position

One legal position, with its text and published markup. Pass a search hit's `position_id`. `text` is plain, `text_html` as published. `norm_refs` dates each statute quoted to the `ua_law` edition then in force, with a `urn` `ua_law__get_unit_fulltext` takes, to compare with today's text. `departs_from`/`departed_in` link departures, read from position texts; `history` has the detail. `approved_at` is NOT a publication date: its absence says nothing about whether a position is current.

ParameterTypeDescription
position_id *integerFrom a search result.

catalog__describe Describe Catalog Tool

A catalog tool's full description and input schema, as tools/list would publish it.

ParameterTypeDescription
tool *stringTool name, from catalog__search.

catalog__call Call Catalog Tool

Run a catalog tool with its arguments. It is validated, limited, billed and answered exactly as a listed tool would be.

ParameterTypeDescription
tool *stringTool name, from catalog__search.
argumentsobjectThat tool's arguments, per catalog__describe.