Skip to main content
Glama

Search Legislation

search_legislation

Search Swiss national legislation via Fedlex by keywords, statute title, or number, with optional year filtering and result limits to locate relevant statutes and regulations.

Instructions

Search Switzerland (CH) national legislation (statutes, acts, codes, regulations, official gazette) via Fedlex - Swiss Federal Legislation API (fedlex.admin.ch) and live national legal archives.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "search_legislation"
  }
}

Input Schema

NameRequiredDescriptionDefault
yearNoOptional enactment year filter.
limitNoMaximum number of results to return.
queryYesKeywords or statute title/number to search in Switzerland legislation.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It usefully discloses provenance (Fedlex API plus live national legal archives), which hints at freshness and authority, but says nothing about read-only nature, rate limits, authentication, or how results are ordered. "Search" implies a non-destructive read, but that is inference rather than disclosure.

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?

A single front-loaded sentence that leads with the verb and geographic scope before trailing into source details. The parenthetical document-type enumeration is dense but earns its place; the raw domain name (fedlex.admin.ch) is slightly redundant alongside "Fedlex" and is the one expendable element.

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?

An output schema exists, so return values need no explanation, and this is a simple three-parameter read tool. What remains uncovered is modest but real: whether coverage is federal-only or includes cantonal law, and how Switzerland's multi-lingual corpus (German/French/Italian) affects query language, both of which an agent would want before calling.

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%, so the baseline is 3: query, year, and limit are all documented in the schema with defaults and bounds. The description adds no extra meaning beyond the schema — nothing about whether year means enactment vs. publication year, how multi-word queries are matched, or how filters combine.

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 pairs a specific verb ("Search") with a precisely bounded resource ("Switzerland (CH) national legislation") and enumerates the document types covered — statutes, acts, codes, regulations, official gazette. It also names the underlying source (Fedlex, fedlex.admin.ch), which lets an agent distinguish this from case-law siblings like search_case_law 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 Guidelines3/5

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

Use is implied by subject matter: an agent can infer this is the tool for statutes and regulations rather than court decisions. However, there is no explicit when-to-use statement, no mention of when another tool (search_case_law, verify_citation) is the better choice, and no stated prerequisites or exclusions.

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