Skip to main content
Glama

Search Legislation

search_legislation

Search Swedish national legislation—statutes, acts, codes, regulations, and the official gazette—by keywords, title, statute number, or enactment year.

Instructions

Search Sweden (SE) national legislation (statutes, acts, codes, regulations, official gazette) via Riksdagen Open Data JSON API (data.riksdagen.se - Svensk författningssamling SFS) 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 Sweden legislation.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.4/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 burden, and it does disclose provenance (Riksdagen Open Data JSON API, data.riksdagen.se, SFS) plus a claim of coverage from 'live national legal archives'. It says nothing about authentication, rate limits, result freshness, language of the indexed text, or whether full text is returned; the output schema covers the return shape, which softens but does not close the gap.

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?

One sentence, front-loaded with the verb and resource, with no filler or repetition. It is dense with parentheticals and URLs, which slightly taxes readability but every clause contributes scope information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a three-parameter search tool with an output schema, the essentials of scope and source are present. Missing are details an agent would want before calling it — supported query language, whether 'year' is enactment or publication year, and what the 'live archives' fallback implies for result consistency.

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 query, year, and limit are all documented in the schema itself, establishing the baseline of 3. The description adds no extra semantics — no note on whether query accepts Swedish statute numbers (SFS 2018:218), how year interacts with free-text queries, or how limit affects ordering.

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?

States a specific verb ('Search') and a well-scoped resource ('Sweden (SE) national legislation'), enumerating the document types covered (statutes, acts, codes, regulations, official gazette) and the underlying source. The legislation-versus-case-law distinction is conveyed by the resource noun itself rather than by an explicit contrast with search_case_law, so it stops short of full sibling differentiation.

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?

Usage is only implied: an agent can infer this is the tool for statutes rather than court decisions from the resource wording. There is no explicit when-to-use statement, no exclusion of case-law queries, and no mention of what to do if the query is about a court ruling, even though search_case_law and search_tiered_court_decisions exist.

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