get_legislation
Full metadata + article text for any federal or cantonal law. Local-first (statutes.db → cantonallaws.db → LexFind API fallback)
How to use it
Project documentation lists get_legislation for the Opencaselaw MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), then check which tools your installed version makes available. Tool availability can depend on configuration and credentials. A server handshake does not verify this tool’s behavior. See the full listing for setup details.
Install Opencaselaw
claude mcp add swiss-caselaw --transport sse https://mcp.opencaselaw.chOther tools in Opencaselaw (20)
Year-by-year decision counts for a statute or topic
Recent-changes feed per canton or federal level (live LexFind API, no local mirror)
Check progress of a running database update (local only)
Build a research-only mock decision outline from facts, grounded in caselaw + statute references; asks clarification questions before conclusion
Trace the appeal chain (Instanzenzug) — prior and subsequent instances
Show what a decision cites and what cites it, with confidence scores
Find the most-cited decisions for a topic or statute
Legal topic → real BGE fact pattern with hidden analysis for Fallbearbeitung practice
Structured brief for any case — regeste, key Erwägungen, cited statutes, and citation authority
Scholarly commentary for a specific federal law article from OnlineKommentar.ch (CC-BY-4.0)
Fetch a single decision by docket number or ID. Includes citation graph counts (cited by / cites).
Statute article or legal concept → ranked leading cases + doctrine timeline
Look up a federal or cantonal Swiss law by SR number / abbreviation + optional canton. Returns full article text from the local mirror (Fedlex for federal; cantonallaws.db for cantonal — direct portal scrape for 22 cantons, LexFind PDF extraction for the remaining 4)
Aggregate stats by court, canton, or year
List all courts with decision counts
Full-text search across 362 legal commentaries from OnlineKommentar.ch across 19 federal laws
Full-text search with filters (court, canton, language, date range, chamber)
Unified federal + cantonal FTS5 search with BM25 rank interleaving. Filter by canton= for a specific jurisdiction, or jurisdiction='federal' / 'cantonal'
LexFind-backed discovery search across federal + cantonal legislation. fetchtopntexts=N enriches the top N results with full article text in a single call
Re-download latest Parquet files from HuggingFace and rebuild the local database (local only)