Skip to main content
Glama

search_legislation

Query Swedish statutes and regulations by keyword using full-text search with BM25 ranking. Optionally filter by SFS number, status, or historical date.

Instructions

Search Swedish statutes and regulations by keyword. FTS5 with BM25 ranking. Do NOT use for case law — use search_case_law instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query in Swedish or English. Supports FTS5 syntax.
document_idNoFilter by SFS number (e.g., "2018:218")
statusNoFilter by document status
as_of_dateNoHistorical date filter (YYYY-MM-DD).
limitNoMaximum results to return
Behavior4/5

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

No annotations are provided, so the description carries the burden. It mentions FTS5 with BM25 ranking, giving insight into search behavior and relevance scoring. While it doesn't cover all behavioral aspects (e.g., pagination, result format), it adequately communicates the core behavior for a read-only search tool.

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?

The description consists of two concise sentences with no wasted words. It front-loads the core purpose and includes critical usage guidance efficiently.

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?

Given the tool has 5 parameters and no output schema or annotations, the description provides sufficient context for an agent to use it correctly. Minor gaps exist (e.g., expected response structure), but the schema covers parameters well, and the search behavior is adequately described.

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% as all 5 parameters have descriptions. The description adds 'FTS5 with BM25 ranking', which enhances understanding of the 'query' parameter's behavior, but overall the schema already explains parameters sufficiently. Baseline score 3 is appropriate.

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 clearly states 'Search Swedish statutes and regulations by keyword' with a specific verb and resource. It also explicitly distinguishes this tool from its sibling 'search_case_law', making its purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

The description provides explicit guidance on when not to use this tool: 'Do NOT use for case law — use search_case_law instead.' This directly addresses the primary alternative, helping the agent choose correctly.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Ansvar-Systems/swedish-law-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server