MCP

Point de terminaison

Version 1.0.0
https://lexipedia.io/mcp

Outils disponibles

14 outils

get_document

Lecture seule

Get a legal source's details and outline

Use this after search returns an `id` to see what a public Swiss legal source is and what it contains: its metadata, how many pages of text it has, and — for a whole law or decision — a `table_of_contents` of its section headers, not its articles. It returns no text. Each outline entry carries the `page` it starts on: pass that to read_document to jump straight there. To read a single article or consideration, call read_document with its id directly; it needs no outline. For a law, `total_versions` says how many consolidated texts it has had over time: call get_document_versions to list them. `total_relations` and `relation_counts` say how many structural links the document has and of which kinds — the acts that amended a law, the decision that reviewed a decision: call get_document_relations to list them. A decision also carries a `citator` standing — `negative` (a later court departed from it, or it was annulled), `caution`, `positive`, `neutral`, or `unanalysed` — with `analysed_citing_decisions` out of `citing_decisions` as the record it rests on. Treat `unanalysed` as no information: it means nobody has examined how later courts treated it, never that it is undisturbed. Use get_document_cited_by to list every citing document and see any available treatment labels. For a whole decision a model has read, the fields carry that reading in your language: the title and `summary`, the `regest` where the court wrote none, `outcome`, `legal_area`, `decision_type` where the source states none, `remedy`, English `keywords`, any `practice_change` (the court changing or refining its own case law: what changed in one sentence, the decisions it moves, and the ids of the considerations that say so), and its `holdings`: each question it decides, the answer as a rule, whether the complaint was `upheld`/`partially_upheld`/`rejected`, and the ids of the considerations that decide it, which read_document takes directly. `generated_fields` names every field a model wrote: those are not the court's words. Use them to find your way, and quote the decision itself through read_document.

Paramètres

idRequis

A search result id: a canonical reference, e.g. `ch:sr-rs-rs:1999-404:fr#art-8` for one article or consideration, or `ch:sr-rs-rs:1999-404:fr` for a whole law or decision. A reference may carry a past version of a law, as `ch:sr-rs-rs:1999-404@2020-01-01:fr`.

string
preferences
object

get_document_cited_by

Lecture seule

List the documents that cite a legal source

Use this to see which documents cite a public Swiss legal source — the reverse of its own references, the way the website lists citing decisions under an article. Pass a search result id: a whole law or decision, or one provision (`…#art-8`, `…#c-3`) to list only the documents citing that provision. `target` says what the counts below are actually about, so a wrong resolution is visible rather than silent: `id`, `identifier` and `title`, plus `pinpoint` — the anchor you named, or null — and `pinpoint_applied`. Narrowing works only for the pinpoints citations themselves carry, an article of a law or a consideration of a decision; ask about any other passage and `pinpoint_applied` is false, meaning the figures are the whole document's and must be reported as the document's, not that passage's. Each entry is one distinct citing document, with a snippet of the citing passage (the citation wrapped in <mark>), how many times that document cites the target (`occurrence_count`), how many distinct documents cite that document in turn (`citation_count`, how much it is itself relied on), and an `id` of the citing passage to pass to read_document. The list is ordered by `citation_count`, so the most-relied-on citing documents come first — say which entries carry that weight rather than presenting the order as given. `total_documents` counts every citing document and `type_counts` breaks that down by type; `type` filters to one, and `pagination` ({ offset, limit }, as in search) pages through the rest. Where a citing decision has been analysed, `treatment` says what it did with the target and `treatment_counts` tallies those. `analysis_coverage` distinguishes analysed from unanalysed citing documents. A null `treatment` means nobody has analysed that citation — never that the citing document does not exist or had nothing to say; `depth` and `quotes` are null with it, so a null `quotes` means unanalysed while false means analysed and not quoting. `treatment_note` is a short phrase naming what the citing decision took from the target (German, French, Italian or English, English for Romansh), null where unanalysed.

Paramètres

idRequis

A search result id: a canonical reference, e.g. `ch:sr-rs-rs:1999-404:fr#art-8` for one article or consideration, or `ch:sr-rs-rs:1999-404:fr` for a whole law or decision. A reference may carry a past version of a law, as `ch:sr-rs-rs:1999-404@2020-01-01:fr`.

string
type

Only citing documents of this type

decision | law | publication | preparatory | circular
pagination
object
preferences
object

get_document_relations

Lecture seule

List a legal source's structural links

Use this to list the structural links of a public Swiss legal source, when get_document's `total_relations` says it has any. Pass a search result id; an article or consideration id lists its document's links. Each entry carries an `id` that is itself a document-tool id. A law names the amendment acts that changed it (`amended_by`, whose `version_dates` are the consolidated versions an act produced) and the act that enacted it (`enacted_by`); an Official Compilation act names what it `amends` or `enacts` and the Federal Gazette item it `follows` (a Gazette item's `resulted_in` is that act); a decision names the challenged decision it reviewed (`reviews`) or the higher decision that reviewed it (`reviewed_by`), whose `effect` — `annulled`, `partially_annulled`, or `annulled_and_remanded` versus `confirmed`, `inadmissible` or `written_off` (the appeal failed without a look at the merits) — says whether the reviewed decision is still good law; an Official Bulletin debate names the parliamentary business it deliberates (`debates`), and a Curia Vista business names its floor debates (`debated_in`); a published leading case (BGE/ATF/DTF) names the full judgment it excerpts (`publishes`), and the judgment names its published form (`published_as`); a consultation names the law its draft is foreseen to impact (`concerns`), and the law names the consultations held over it (`consulted_in`); an act names the works it completely repealed (`repeals`), and a repealed law names the act that ended it (`repealed_by`); a Federal Gazette item names the Curia Vista business it documents (`documents`), and the business names its Gazette paper trail (`documented_in`). `relation_counts` always tallies every kind the document has, so a page dominated by one kind never hides another; `relation` filters to one kind and `pagination` ({ offset, limit }) pages through it. `total_relations` counts the filtered set. For which documents cite a source, use get_document_cited_by instead — these are the editorial links, not citations.

Paramètres

idRequis

A search result id: a canonical reference, e.g. `ch:sr-rs-rs:1999-404:fr#art-8` for one article or consideration, or `ch:sr-rs-rs:1999-404:fr` for a whole law or decision. A reference may carry a past version of a law, as `ch:sr-rs-rs:1999-404@2020-01-01:fr`.

string
relation

Only links of this kind

amends | amended_by | enacts | enacted_by | follows | resulted_in | reviews | reviewed_by | debates | debated_in | publishes | published_as | concerns | consulted_in | repeals | repealed_by | documents | documented_in
pagination
object
preferences
object

get_document_versions

Lecture seule

List legislation and tax guidance versions

Use this to list the consolidated texts a law has had over time, when get_document's `total_versions` says it has more than one. Pass a search result id; an article id lists the versions of the law it belongs to. Entries come newest first, each with the `version` key to pass to read_document to read the law — or one article of it — as it stood then, its in-force window, and the languages it was published in. `pagination` ({ offset, limit }) pages into older history. Legislation and cantonal tax guidance can have versions. An exact canonical tax-guidance reference also lists archived editions when no current edition appears in search. For undated guidance, version_date is null and observed_at records when the text was captured. Other documents answer with an empty list.

Paramètres

idRequis

A search result id: a canonical reference, e.g. `ch:sr-rs-rs:1999-404:fr#art-8` for one article or consideration, or `ch:sr-rs-rs:1999-404:fr` for a whole law or decision. A reference may carry a past version of a law, as `ch:sr-rs-rs:1999-404@2020-01-01:fr`.

string
pagination
object
preferences
object

get_entity

Lecture seule

Read one person, organization, party, gazette notice, trademark, design or patent

Use this after search returns a person, organization or notice, to read the whole record by its `type` and `id`. An organization (any commercial-register entity) comes with its register facts (legal form, seat, address, capital, purpose, status and dates), its officers (board members, managing directors, signatories, auditor; current ones first, former ones with the date they left), its gazette notices with their text (page through them with `notices`), related entities (head office, branches, takeovers, auditor), former names, and the lawyers the bar registers place there. A person comes with every facet the registers assert: the bar entry (firm, town, specialisations, the latest decisions naming them as counsel) and the parliamentary mandates (council, canton, party, group, seats over time). A party comes with its current members. A notice comes with its full text and every entity it concerns. A trademark (a Swiss mark) comes with its register facts (numbers, status, type, filing, registration and expiry dates, deletion reason), the goods and services it covers per Nice class, and every party (holder, agent, licensees, pledgees) with the organization each was recognised as; an organization lists the marks it holds. A design (a Swiss design registration) comes with its register facts (numbers, status, Locarno classes, filing, registration and expiry dates, deletion reason), the designs deposited with their descriptions, and every party (holder, agent, designers) with the organization each was recognised as. A patent (a Swiss patent or a European patent with effect in Switzerland) comes with its register facts (numbers, status, filing, grant and expiry dates, deletion reason, IPC classes, priorities), the supplementary protection certificates extending it, and every party (holder, agent, inventors) with the organization each was recognised as. Never write an id from memory: an unknown id answers not_found.

Paramètres

typeRequis

What the id names: a `person`, an `organization` (a commercial-register entity; a party is one too), a `party`, a gazette `notice`, a Swiss `trademark`, a Swiss `design`, or a `patent` with effect in Switzerland. Use the `type` the search result gave.

person | organization | party | notice | trademark | design | patent
idRequis

The `id` a search result gave (ch:persons:…, ch:organizations:…, ch:notices:…, ch:trademarks:…, ch:designs:…, ch:patents:…). A UID such as CHE-123.456.789 also names an organization, an SOGC number a notice, a registration number a trademark or a design, and a publication number (EP…, CH…) a patent. Never write one from memory.

string
notices

Organizations only: which of its gazette notices to return, newest first (20 by default). Omit it for any other type.

object
preferences
object

get_schema

Lecture seule

Get the corpus schema

Use this before run_query to inspect the PostgreSQL tables, columns, relationships, and query guidance available for the public Swiss legal corpus.

Paramètres

Aucun paramètre

list_pages

Lecture seule

List the website's main pages

Use this to discover the main pages of the Lexipedia website — what exists and what each page is for — before reading one with read_page. Also lists the patterned page families (source collections, document pages) and how to reach an instance of each. Every path accepts a locale prefix (en, de, fr, it, rm), e.g. `/de/documents`.

Paramètres

Aucun paramètre

list_values

Lecture seule

List available search values

Use this when the user needs valid filter values for a Lexipedia search field, such as courts, sources, languages, or jurisdictions. Results are paginated in pages of 50. Do not use this to search legal documents or to infer that a value is legally authoritative.

Paramètres

fieldRequis

Listable Lucene field. Available fields: canton, chamber, citator, collection, council, court, court_tier, faction, government_level, jurisdiction, kind, language, legal_area, legal_form, level, municipality, notice_kind, outcome, party, publication_status, register, scope, seat, source, status

canton | chamber | citator | collection | council | court | court_tier | faction | government_level | jurisdiction | kind | language | legal_area | legal_form | level | municipality | notice_kind | outcome | party | publication_status | register | scope | seat | source | status
page

1-based page number. Each page returns up to 50 values.

integer
preferences
object

read_document

Lecture seule

Read a legal source's text

Use this to read the text of a public Swiss legal source: an article or consideration in full, or a page range of a whole law or decision. Call get_document first for a long source — its table of contents gives the page each section starts on, so you can read that page instead of paging from the beginning. A single article or consideration needs no outline: read it directly by its id. Without a `version` it serves the text in force today; pass one from get_document's `versions` to read the law as it stood then. The response reports the range it actually served, which is clamped to the document.

Paramètres

idRequis

A search result id: a canonical reference, e.g. `ch:sr-rs-rs:1999-404:fr#art-8` for one article or consideration, or `ch:sr-rs-rs:1999-404:fr` for a whole law or decision. A reference may carry a past version of a law, as `ch:sr-rs-rs:1999-404@2020-01-01:fr`.

string
from

First page to read, about 10000 characters per page. Use the page a table_of_contents entry gives to start at that section.

integer
to

Last page to read. Defaults to `from`; at most 3 pages are served per call, and the response says which range it returned.

integer
version

Read a past consolidated version of a law instead of the text in force today: a `version` from get_document's `versions`. Legislation and cantonal tax guidance have versions. An exact canonical tax-guidance reference can read an explicitly selected archived edition even when no current text appears in search. A table_of_contents page number describes the current text, so in an older version a section may sit a page or so away.

string
preferences
object

read_page

Lecture seule

Read a page of the website

Use this to read any public page of the Lexipedia website itself — /terms, /privacy, /coverage, a /browse listing, or any path a result URL points at — converted to markdown. Pages are served in the same page ranges as read_document, so a long page is read a few pages at a time. Paths may carry a locale prefix (/de/terms) to read that language. For the text of a law or decision prefer read_document, which reads the stored source directly.

Paramètres

pathRequis

Site path of the page to read, e.g. `/terms` or `/de/browse`. A full URL on the site's own domain is also accepted.

string
from

First page to read, about 10000 characters per page.

integer
to

Last page to read. Defaults to `from`; at most 3 pages are served per call, and the response says which range it returned.

integer

report_issue

Écrit des données

Report an issue

Use this only after the user explicitly asks or confirms that Lexipedia should create an internal issue about incorrect, incomplete, stale, or broken search or retrieval results. This writes a private issue record; do not include personal data, secrets, or private legal material. Do not use it merely because search returned no matches.

Paramètres

issueRequis

Clear description of the issue the agent discovered.

string
categoryRequis

Triage category for the issue.

content | metadata | search | retrieval | mcp_tool | performance | other
severityRequis

Expected impact of the issue.

info | warning | error
contextRequis

Only non-sensitive context needed to reproduce the issue. Never include personal data, credentials, tokens, or private legal records.

object

run_query

Lecture seule

Query the corpus with SQL

Use this when a question about the Swiss legal corpus needs counts, aggregation, joins, date ranges, or citation-graph structure that search cannot answer. Call get_schema first, and prefer search and get_document for finding legal texts. Runs one read-only SQL statement against the public corpus. Rows are capped and long cells truncated; queries time out after a few seconds, so filter and aggregate instead of scanning whole tables.

Paramètres

queryRequis

Single read-only SQL statement (PostgreSQL 18). Call get_schema first for readable tables, columns, relationships, and query guidance.

string
limit

Maximum rows to return (hard cap 200).

integer

search_legislation_changes

Lecture seule

Find legislation taking effect or changing in a date range

Use for upcoming or historical changes to Swiss law, including amendments to longstanding laws. Requires an explicit date range. Returns one event per work and effective/applicability date, with versions and amendment acts linked by recorded version dates. A consolidation is evidence of a published version, not proof of a new obligation; read the selected version and operative amendment before explaining obligations. Only recorded events are covered: an empty result does not establish that no reform is planned. Count is an exact count of events, not translations. Follow next_offset while has_more is true before making an exhaustive claim.

Paramètres

fromRequis

Inclusive effective/applicability date, YYYY-MM-DD. Resolve relative dates from the current clock.

string
toRequis

Inclusive final date, YYYY-MM-DD.

string
jurisdiction

Exact jurisdiction, e.g. ch or ch-vd; omit to include every jurisdiction.

string
query

Literal text in the law title or number; not Lucene and not a search of provision text.

string
preferences
object
pagination
object