Skip to main content
Glama

Search federal legislation

search_federal_law
Read-only

Find Swiss federal law by title or abbreviation and get SR number, official title, abbreviation, and Fedlex link for citation.

Instructions

Search the Swiss Classified Compilation (SR/RS) of federal law by title or abbreviation (e.g. 'data protection', 'OR', 'Datenschutz'). Exact abbreviation/title matches are ranked first. Returns SR number, title, abbreviation and the official Fedlex link. Search in the language of your query term (German titles for German terms, etc.).

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_federal_law"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
queryYesTitle keyword or abbreviation, e.g. 'Datenschutz', 'obligations', 'DSG'
languageNoLanguage of titles to searchde
in_force_onlyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.3

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered. The description adds genuine behavioral context — exact abbreviation/title matches rank first, and the return payload is SR number, title, abbreviation and Fedlex link. However, it never explains the default in_force_only=true behavior or whether repealed ordinances are excluded, which is a meaningful behavioral gap for a legal search.

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?

Four tight sentences, front-loaded with purpose and searchable fields, then ranking behavior, then return shape, then the language hint. No sentence simply restates the tool name or the schema.

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?

With no output schema, the description correctly compensates by enumerating returned fields, and it explains ranking and language behavior. The one missing piece for a four-parameter legal search is what in_force_only actually filters and what limit affects, but overall the definition is sufficient to call the tool correctly.

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 coverage is 50%: query and language are documented in-schema, and the description adds real meaning for language by tying it to the query term's language. But limit and in_force_only carry no description in either place, and the latter has a non-obvious default of true that changes results materially.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb ('Search') plus a precisely named resource ('Swiss Classified Compilation (SR/RS) of federal law') and the searchable fields (title or abbreviation), with examples. It does not name a sibling to differentiate from (e.g. search_federal_gazette or get_law_by_sr), but the resource is distinct enough that an agent can tell what it retrieves.

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?

Provides one real usage instruction — search in the language of the query term, with German/French examples implied — but gives no when-to-use vs. alternatives guidance and no exclusions. Nothing tells an agent whether to prefer this over get_law_by_sr when it already has an SR number.

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

Deploy Server

Other Tools