Skip to main content
Glama

Riksdag & Regering

Räkna regeringens dokument

regering_statistik
Read-onlyIdempotent

Räkna regeringens dokument per departement, dokumenttyp, månad eller år, med samma filter som search_regering. Använd för frågor som "hur många propositioner lämnade varje departement 2025?" eller "hur har antalet pressmeddelanden om skola utvecklats per år?".

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": {
      "gruppering": "<gruppering>"
    },
    "name": "regering_statistik"
  }
}

Input Schema

NameRequiredDescriptionDefault
sokNoSökord som alla måste finnas i titel, beteckning eller sammanfattning, t.ex. "skola betyg" eller "prop. 2025/26:195". Sökningen är ordagrann, så pröva flera böjningsformer vid få träffar.
tomNoSenaste publiceringsdatum, ÅÅÅÅ-MM-DD.
fromNoTidigaste publiceringsdatum, ÅÅÅÅ-MM-DD.
typerNoDokumenttyper att söka i. Standard: pressmeddelanden, propositioner, skrivelser, lagrådsremisser, SOU, Ds, kommittédirektiv, remisser, regeringsuppdrag, tal, debattartiklar och artiklar.
grupperingYesVad antalen ska delas upp på.
departementNoDepartement, hela eller del av namnet, t.ex. "Finansdepartementet" eller "utbildning".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so the safety profile is fully covered without description help. The description adds that filtering semantics are identical to search_regering, which is useful behavioral context, but it says nothing about how counts are returned, whether empty groups appear, or how the search word matches. That is a modest addition on top of already-rich annotations.

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: the first front-loads the verb, resource, grouping options and filter provenance; the second supplies exactly two illustrative queries with no filler. Nothing here is redundant with the title or schema.

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 six-parameter aggregation tool with full schema coverage but no output schema, the description establishes what is counted, what it is grouped by, and how filters behave. The one remaining gap is the shape of the result (e.g. grouped count rows), which an agent must infer from "räkna ... per".

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3, but the description contributes meaning beyond the schema by naming the four grouping dimensions as a set and by asserting that sok/from/tom/typer/departement behave exactly as in search_regering. That cross-tool inheritance of filter semantics is real added value not encoded in the schema itself.

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?

"Räkna regeringens dokument" gives a specific verb (count) plus the resource, and the grouping axes (departement, dokumenttyp, månad, år) further pin down what kind of result comes back. It implicitly contrasts with search_regering ("med samma filter som search_regering"), making clear this returns aggregates rather than document lists, though the contrast is stated as shared filters rather than as an explicit division of labor.

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?

The "Använd för frågor som ..." clause with two concrete example questions (propositions per department in 2025, press-release trend by year) gives an agent a clear trigger for aggregation-style questions. There is no explicit when-not or statement that document-level retrieval belongs to search_regering/get_regering_dokument, so the routing is only implicit.

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.