Skip to main content
Glama

openlex__zhlaw_update_cache

Idempotent

Force a manual update of the local Zurich law cache (SQLite/FTS5) from HuggingFace when you need to bypass the 24-hour auto-refresh.

Instructions

Aktualisiert den lokalen Cache der Zürcher Gesetzesdaten.

Nur aufrufen wenn der Cache explizit neu geladen werden soll. Der Cache wird automatisch beim Start befüllt und ist 24 Stunden gültig — manuelles Update ist selten nötig.

Lädt ~970 Gesetze von HuggingFace (rcds/swiss_legislation) in die lokale SQLite-DB mit FTS5-Index (~25 s erster Lauf). force=False überspringt den Download wenn Cache <24h alt (gibt status='cache_fresh' zurück). force=True erzwingt Neudownload. Erfordert Internetzugang zu HuggingFace.

ACHTUNG — dieses Werkzeug macht die GESETZE nicht aktueller. Es lädt denselben Datensatz erneut, und der ist eingefroren: Die jüngste Fassung darin stammt vom 2023-01-01 (gemessen am 2026-08-08; der Datensatz selbst wurde zuletzt am 2024-10-10 angefasst). Bei Zweifeln an der Aktualität eines Wortlauts hilft nur der ZH-Lex-Permalink, nicht dieses Werkzeug.

force=False

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_typeNocache_status
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.9/5.0
Behavior5/5

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

Annotations already declare write (readOnlyHint=false), openWorld, idempotent and non-destructive. The description adds substantial context beyond that: ~970 laws downloaded from HuggingFace, ~25s first run, specific SQLite/FTS5 target, internet requirement, and a critical caveat that the dataset is frozen (newest version dated 2023-01-01) so this tool does NOT make law texts more current. That last point is high-value behavioral disclosure no annotation could carry.

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?

The use_case / important_notes / example tagging is well front-loaded and each block earns its place. It is on the long side, but the length is justified by the frozen-dataset warning; only minor tightening is possible.

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

Completeness5/5

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

An output schema exists, so return values need not be explained, and the annotations cover the safety profile. Combined with runtime, source, duration, network requirement, cache-freshness behavior and the data-staleness caveat, an agent has everything needed to decide and invoke correctly.

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

Parameters5/5

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

Schema description coverage is 0% and there is one parameter, so the description must carry the semantics — and it does: force=False skips download when the cache is <24h old and returns status='cache_fresh', force=True forces a re-download, with a concrete example. Nothing about the parameter is left ambiguous.

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+resource: refreshing the local cache of Zurich legal data. A sibling like zhlaw_search_laws or zhlaw_get_law is clearly a read-of-laws tool, whereas this one is explicitly a cache-maintenance operation, so the agent can distinguish it without opening schemas.

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 gives explicit when-to-use guidance ('nur aufrufen wenn der Cache explizit neu geladen werden soll') plus a when-not ('manual update is rarely needed; cache is auto-filled at start and valid 24h'). This is exactly the routing information an agent needs.

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