Skip to main content
Glama

Riksdag & Regering

Sök riksdagsdokument

search_dokument
Read-onlyIdempotent

Sök bland riksdagens dokument: motioner, propositioner, betänkanden, interpellationer, skriftliga frågor och svar, protokoll, SOU, lagar (SFS) m.m. Kombinera fritext (sok) med filter. Utan sok listas de senaste dokumenten som matchar filtren. Svaret innehåller dok_id som används i get_dokument för fulltext, beslut och voteringar. Exempel: motioner om kärnkraft från M → sok="kärnkraft", doktyp=["mot"], parti="M". Vad som sagts i kammaren om ett ämne → sok="…", doktyp=["prot"].

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "search_dokument"
  }
}

Input Schema

NameRequiredDescriptionDefault
rmNoRiksmöte, t.ex. "2025/26". Ett riksmöte löper från september till september.
sokNoFritext som söks i titel och innehåll, t.ex. "kärnkraft" eller "ISK skatt".
tomNoSenaste datum, ÅÅÅÅ-MM-DD.
fromNoTidigaste datum, ÅÅÅÅ-MM-DD.
sidaNoSidnummer, börjar på 1.
antalNoTräffar per sida, standard 20.
partiNoPartibeteckning: S, M, SD, C, V, KD, L eller MP.
doktypNoEn eller flera dokumenttyper: mot (motion), prop (proposition), bet (betänkande), ip (interpellation), fr (skriftlig fråga), frs (svar på skriftlig fråga), prot (protokoll), rskr, sou, ds, dir, fpm, sfs, rir. Fler koder: get_referensdata.
nummerNoDokumentnummer inom riksmötet, t.ex. "39" för motion 2025/26:39.
subtypNoUndertyp, t.ex. "skr" (skrivelse, tillsammans med doktyp prop) eller "Kommittémotion".
ordningNoStandard: fallande (nyast/mest relevant först).
utskottNoUtskott som behandlar dokumentet, t.ex. FiU, SoU, UbU, JuU.
sorteringNoStandard: relevans när sok anges, annars datum.
beteckningNoBetänkandebeteckning, t.ex. "FiU1" (kombinera med rm).
intressent_idNoLedamotens id (från search_ledamoter) för dokument som ledamoten står bakom.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, open-world behavior, so the description's job is to add operational context. It does: the no-query fallback (latest matching documents) and the fact that responses expose dok_id for downstream retrieval are real behavioral facts not in the annotations. Sorting defaults are present but largely duplicated from the schema rather than the description's own contribution.

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?

Front-loaded with the resource scope, then query-combination behavior, then the dok_id flow, then two compact examples — a logical order with little filler. A couple of clauses (the SOU/SFS enumeration and the second example) could be trimmed without losing meaning.

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 15-parameter, zero-required search tool with no output schema, the description covers scope, default no-query behavior, result identifiers and query patterns. Pagination and result limits are left entirely to the schema, which is acceptable given full schema coverage, but a note on result windowing would close the last gap.

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 every one of the 15 parameters is already documented with format, enum values and examples in the schema itself. The description reinforces semantics only through a single combined example (sok + doktyp + parti), which shows how filters compose but adds little beyond the schema text. 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?

States a specific verb and resource (search Riksdag documents) and enumerates the covered document types (motioner, propositioner, betänkanden, protokoll, SOU, SFS). It also distinguishes itself from the sibling get_dokument by explaining that results carry a dok_id used there for fulltext, beslut and voteringar.

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?

Gives clear usage context: combine free text (sok) with filters, and when sok is omitted the newest documents matching the filters are listed. Two concrete worked examples (motions on nuclear power from M; chamber statements via doktyp=["prot"]) show intended query shapes. It stops short of explicit exclusions, e.g. when to prefer search_anforanden over protocol documents.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.