Skip to main content
Glama

openlex__zhlaw_search_laws

Read-onlyIdempotent

Search all Zurich cantonal laws by keyword when the relevant legal area is unknown. Returns ranked full-text matches across ~970 laws, filterable by subject prefix.

Instructions

Volltextsuche in allen Zürcher Gesetzen mit FTS5-Ranking.

Allgemeine Suche nach einem Rechtsbegriff über alle ~970 kantonalen Gesetze. Wähle dieses Tool wenn das Rechtsgebiet unbekannt ist. Für das Bildungsrecht (412.x) ist openlex__zhlaw_find_education_laws schneller und präziser. Um Artikel innerhalb eines bekannten Gesetzes zu finden, nutze openlex__zhlaw_search_articles.

FTS5-Syntax: AND, OR, NOT, Phrasensuche "...". Ergebnisse nach BM25-Relevanz sortiert. Max 50 Treffer pro Aufruf (limit-Parameter). sr_prefix filtert nach Rechtsgebiet (412=Bildung, 331=Steuern, 700=Bau). Sucht im lokalen Cache — Aktualität der Metadaten via openlex__zhlaw_get_law_metadata prüfen.

query='Elternrat OR Elternmitwirkung', sr_prefix='412', limit=10

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNo
sourceNoKanton Zürich Rechtssammlung — HuggingFace rcds/swiss_legislation (CC-BY-SA 4.0) & zh.ch
messageNo
resultsNo
provenanceYes
corpus_noteNoBestandsstand 2023-01-01 — die jüngste Fassung im Datensatz stammt von diesem Datum. Spätere Änderungen und Aufhebungen fehlen; ein zwischenzeitlich aufgehobenes Gesetz erscheint weiterhin als in Kraft. Für den geltenden Wortlaut den ZH-Lex-Permalink konsultieren.
result_typeNolaw_summaries
corpus_as_ofNo2023-01-01

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.3.0
    • addedOutput schema / properties / corpus_as_of
      Added value: +{
      +  "default": "2023-01-01",
      +  "title": "Corpus As Of",
      +  "type": "string"
      +}
    • addedOutput schema / properties / corpus_note
      Added value: +{
      +  "default": "Bestandsstand 2023-01-01 — die jüngste Fassung im Datensatz stammt von diesem Datum. Spätere Änderungen und Aufhebungen fehlen; ein zwischenzeitlich aufgehobenes Gesetz erscheint weiterhin als in Kraft. Für den geltenden Wortlaut den ZH-Lex-Permalink konsultieren.",
      +  "title": "Corpus Note",
      +  "type": "string"
      +}
  2. First observedv0.2.3

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered. The description adds genuine operational context beyond that: BM25 relevance ordering, a hard 50-result cap, cache-backed search, and a pointer to get_law_metadata for freshness. It does not describe pagination beyond the limit cap, keeping it just short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tag-delimited sections (use_case, important_notes, example) front-load the routing decision and keep each block tight, with a concrete worked example. Slightly verbose for the amount of content, but every block carries distinct information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, return payloads need not be explained, and the description still covers scope, ranking, limits, and cache-freshness caveats. Coverage is strong; only finer ranking/pagination behavior is left implicit.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The nested schema already documents every field (limit, query, sr_prefix, active_only) with examples, so the reported 0% coverage reflects the wrapper 'params' node rather than real gaps. The description reinforces sr_prefix examples (adding 700=Bau) and the limit cap, but largely restates schema content, warranting the baseline 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Volltextsuche in allen Zürcher Gesetzen') plus the retrieval mechanism (FTS5-Ranking). It explicitly distinguishes itself from siblings openlex__zhlaw_find_education_laws and openlex__zhlaw_search_articles by scope, so an agent can route without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The <use_case> block states exactly when to pick this tool ('wenn das Rechtsgebiet unbekannt ist') and names two alternatives with the conditions that favor each (Bildungsrecht 412.x, articles within a known law). Nothing is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.