Skip to main content
Glama

openlex__zhlaw_update_cache

Idempotent

Updates the local cache of Zurich legislation data. Use only when search results appear outdated or to force a refresh.

Instructions

Aktualisiert den lokalen Cache der Zürcher Gesetzesdaten.

Nur aufrufen wenn Gesetzes-Suchergebnisse veraltet wirken oder 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.

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
result_typeNocache_status
Behavior5/5

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

Beyond annotations (idempotent, not destructive), the description adds key behaviors: downloads ~970 laws from HuggingFace, takes ~25s first run, force=False skips if cache fresh returning 'cache_fresh', force=True forces download, requires internet. This fully informs the agent of side effects and state outcomes.

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

Conciseness5/5

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

The description is well-structured: short introductory sentence, then use_case, important_notes (with timings and behavior), and a clear example. Every sentence serves a purpose, and it's front-loaded with the core action.

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?

For a simple one-parameter update action, the description covers usage, behavior, and output snippet. An output schema exists, so detailed return structure is not needed. Minor gap: no mention of error handling or internet failure, but still complete enough for typical use.

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

Parameters4/5

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

The single boolean parameter 'force' is described in the schema as 'Cache auch wenn aktuell (<24h) erzwingen.' The tool description adds explicit return value behavior (status='cache_fresh' when skipped) and the time context. This adds meaningful nuance beyond the schema's brief description.

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?

The description clearly states it updates the local cache of Zurich law data. The use_case explicitly tells when to call: when search results seem outdated or cache needs reloading. Sibling tools are all query tools, so this stands out as a cache management action.

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

Usage Guidelines4/5

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

The description provides explicit context: cache auto-refreshes every 24h, manual update rarely needed, and condition for calling (outdated results). However, it does not name specific alternative tools for when the cache should not be called, though siblings are clearly different in purpose.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/malkreide/openlex-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server