Skip to main content
Glama

Switzerland Law

Ch Law Search

ch_law_search
Read-onlyIdempotent

Search Swiss federal legislation (Fedlex, Federal Chancellery) by title word, abbreviation or SR number, in German, French, Italian or English: e.g. query "Datenschutz" lang "de", query "protection des donnees" lang "fr", abbreviation "DSG", or sr_number "235.1" (the Classified Compilation number). By default only acts in force today are returned (in_force_only=false adds repealed and not-yet-in-force acts). Returns id (the SR number, usable in ch_law_get), title, short title, SR number, AS (Official Compilation) reference, entry-into-force date, status and link; 25 per page, use page to continue. Federal law only, no cantonal law and no EU law.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "lang": "de",
      "query": "Datenschutz"
    },
    "name": "ch_law_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
langNoLanguage of the title search and of the titles returned (default de)
pageNoPage number, 1-based (default 1)
queryNoWord(s) from the title in the chosen language, all must match, e.g. "Datenschutz" or "protection des donnees"
sr_numberNoClassified Compilation (SR) number, e.g. "235.1" (use instead of query)
abbreviationNoOfficial short title, e.g. "DSG", "ZGB", "StGB", "LPD"
in_force_onlyNoOnly acts in force today (default true)

Output Schema

NameRequiredDescriptionDefault
langNo
pageNo
countNo
queryNo
sourceNo
resultsNo
next_pageNo
sr_numberNo
data_as_ofNo
abbreviationNo
empty_reasonNo
in_force_onlyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive, open-world, so the safety profile needs no restatement. The description adds genuinely useful behavior beyond them: the default in-force-only filtering and what changing it surfaces, plus fixed 25-per-page pagination with the page parameter. The enumeration of returned fields partly duplicates the existing output schema, keeping this at 4.

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?

Dense but well front-loaded: search identity and scope first, then examples, then default-filter behavior, then return fields and pagination. Every sentence is informative, though listing the return fields is somewhat redundant given the output schema.

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?

For a six-parameter, zero-required search tool with full schema coverage, annotations and an output schema, the description covers the gaps structured data cannot: jurisdictional limits, default filtering, pagination, and the handoff to ch_law_get. Nothing an agent needs in order to call it correctly is missing.

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?

Schema description coverage is 100% with per-parameter descriptions, including the lang enum and the sr_number example, so the schema carries most of the burden. The description reinforces the query/sr_number/abbreviation distinction and gives realistic values ('Datenschutz', 'protection des donnees', '235.1'), but adds little syntax or matching semantics (e.g. case sensitivity, partial-word behavior) beyond the schema.

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 ('Search Swiss federal legislation (Fedlex, Federal Chancellery)') and enumerates the four search keys (title word, abbreviation, SR number, with language). It also explicitly bounds the scope ('Federal law only, no cantonal law and no EU law') and notes the returned id feeds ch_law_get, which separates it from that sibling.

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?

Gives concrete invocation patterns ('query "Datenschutz" lang "de"', 'abbreviation "DSG"', 'sr_number "235.1"') and states that sr_number is used instead of query. It also tells the agent when the default filter applies (in_force_only=false adds repealed/not-yet-in-force acts) and points to ch_law_get for the follow-up fetch. It stops short of an explicit 'do not use this to retrieve full text' exclusion, so a 4 rather than 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.