Skip to main content
Glama

openlex__zhlaw_search_articles

Read-onlyIdempotent

Search all articles of a specified law for a term to find relevant articles when the law is known but the article number is not.

Instructions

Durchsucht alle Artikel eines bestimmten Gesetzes nach einem Begriff.

Wenn bekannt ist, in welchem Gesetz gesucht werden soll, aber nicht welcher Artikel relevant ist. Liefert alle Treffer-Artikel mit Inhalt. Für einen einzelnen Artikel mit bekannter Nummer: openlex__zhlaw_get_article.

Parst das Gesetz in einzelne Artikel und durchsucht Titel und Inhalt. Suche ist case-insensitive, kein FTS5 (einfaches Substring-Match). Gibt count=0 wenn kein Artikel den Begriff enthält. Benötigt Volltext im Cache — bei fehlendem Inhalt: Hinweis im message-Feld.

law_identifier='VSG', query='Elternrat'

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_typeNoarticles
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 cover the safety profile (readOnly, idempotent, non-destructive), and the description adds substantial context beyond them: substring-match semantics (no FTS5), case-insensitivity, count=0 on no match, and the cache-dependency with a hint surfaced in the message field. This is rich, non-obvious behavioral disclosure.

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?

Front-loads the core purpose, then organizes usage, caveats, and an example into clearly labelled sections. Every sentence adds information; nothing is filler despite the multi-part structure.

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 described, yet it still notes count=0 behavior. Combined with the cache requirement, match semantics, and routing to the sibling tool, an agent has everything needed to call it correctly.

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?

Schema description coverage is reported as 0%, so the description must compensate, and it does: it explains that the law is parsed into articles and that title and content are both searched, plus a concrete example (law_identifier='VSG', query='Elternrat'). It still doesn't clarify the law_identifier format (Ordnungsnummer vs. Abkürzung) beyond the example, so not a full 5.

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 (search) and resource (all articles of a specific law) with clear scope. It explicitly distinguishes itself from the sibling openlex__zhlaw_get_article, so an agent can route correctly without opening either 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 use it (law known, article unknown) and names the alternative (openlex__zhlaw_get_article) for the case of a known article number. This is explicit when-to-use and when-to-use-something-else guidance.

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