Skip to main content
Glama

Get legislation by SR number

get_law_by_sr
Read-only

Look up a Swiss act by its SR number to get official-language titles, in-force status, and Fedlex links; other acts sharing the number are listed separately.

Instructions

Look up one act of the Classified Compilation by its SR number (e.g. '220' Code of Obligations, '235.1' Data Protection Act). Returns titles in all official languages, in-force status and Fedlex links for the act currently in force; other acts sharing the SR number (e.g. repealed predecessors) are listed separately under other_acts.

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": {
      "sr_number": "<sr_number>"
    },
    "name": "get_law_by_sr"
  }
}

Input Schema

NameRequiredDescriptionDefault
sr_numberYesSR number, e.g. '220', '235.1', '101'

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.3

TDQS

A4.1/5.0
Behavior4/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 useful return details: titles in all official languages, in-force status, Fedlex links, and that other acts sharing the SR number appear under other_acts. This goes beyond annotations and compensates for the absence of an output schema.

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?

Two sentences, front-loaded with purpose, then return behavior. No wasted wording; examples and edge case are included efficiently.

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 single-parameter read-only lookup with no output schema, the description covers purpose, return fields, and multi-act handling. It is complete enough for an agent to invoke correctly; the only minor gap is not-found behavior, which is not critical.

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 100%, so the single sr_number parameter is fully documented in the schema. The description adds examples ('220', '235.1') that match the schema and clarifies that the number refers to an act, but no additional syntax or format details beyond the schema.

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?

The description states a specific verb ('Look up') and resource ('one act of the Classified Compilation by its SR number'), with concrete examples. It does not explicitly name sibling tools like search_federal_law, so an agent must infer that this is a direct lookup rather than keyword search, though the distinction is fairly obvious.

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?

Clear context is given: use when you have an SR number to retrieve a specific act. It does not explicitly contrast with search_federal_law or list_recent_legislation_changes, and offers no exclusions, but the direct-lookup framing is sufficient.

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