Skip to main content
Glama
Ansvar-Systems

Finnish Law MCP Server

search_legislation

Search Finnish statutes and regulations by keyword with boolean, phrase, and prefix search. Returns provision snippets, scores, metadata, and status and date filters.

Instructions

Search Finnish statutes and regulations by keyword.

Searches provision text using FTS5 with BM25 ranking. Supports boolean operators (AND, OR, NOT), phrase search ("exact phrase"), and prefix matching (term*).

Returns matched provisions with snippets, relevance scores, and document metadata.

When NOT to use: If you already know the exact statute number and provision, use get_provision instead. If you need a comprehensive multi-source answer, use build_legal_stance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum results
queryYesSearch query in Finnish or English. Supports FTS5 syntax.
statusNoFilter by document status
as_of_dateNoOptional historical date filter (YYYY-MM-DD). Returns versions valid on that date.
document_idNoFilter to a specific statute by statute number (e.g., "1050/2018" or "2018:218")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.3

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It discloses the search algorithm (FTS5 with BM25), supported query syntax (boolean operators, phrase search, prefix matching), and return contents (provisions, snippets, relevance scores, document metadata). It does not mention rate limits, pagination, or error behavior, but for a search tool the disclosed behavior is substantial and useful.

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 is well-structured and front-loaded: the core purpose is stated in the first sentence, followed by search capabilities, return values, and explicit exclusions. Every sentence earns its place, and the 'When NOT to use' section is a model of efficient guidance.

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?

For a search tool with 5 parameters, 100% schema coverage, and no output schema, the description is nearly complete. It covers what the tool does, how the search works, what it returns, and when not to use it. The only minor gap is that it doesn't describe the structure of the returned metadata or snippets, but the absence of an output schema makes that a small omission.

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 schema already documents all five parameters. The description adds context about FTS5 syntax support and the as_of_date historical filter, but does not add significant meaning beyond what the schema provides. Baseline 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 the tool's function: searching Finnish statutes and regulations by keyword, with specific details about the search technology (FTS5, BM25), supported operators, and return values. It distinguishes itself from siblings by explicitly naming get_provision and build_legal_stance as alternatives for different use cases.

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 'When NOT to use' guidance, naming two sibling tools (get_provision and build_legal_stance) and the conditions that should route an agent to them. This is exactly the kind of decision support an agent needs to select the correct tool.

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