Skip to main content
Glama

Riksdag & Regering

Hämta riksdagsdokument

get_dokument
Read-onlyIdempotent

Hämta ett riksdagsdokument med metadata, text och ärendeinformation. Ger undertecknare, motionsyrkanden med utskottets och kammarens beslut, utskottets förslagspunkter med votering_id (använd i get_votering), reservationer, aktiviteter, bilagor (PDF) och relaterade dokument. Långa texter levereras i delar: finns text.next_offset i svaret, skicka det som offset för att läsa vidare.

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": {
      "dok_id": "<dok_id>"
    },
    "name": "get_dokument"
  }
}

Input Schema

NameRequiredDescriptionDefault
dok_idYesDokumentets id från search_dokument, t.ex. "HD024126" eller "HC01FiU1".
offsetNoTeckenposition att börja läsa texten från. Standard 0.
max_teckenNoMax antal tecken text per anrop. Standard 8000.
inkludera_textNoSätt false för enbart metadata och beslut. Standard true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, so the description's added value is in disclosure of the paging protocol: long texts arrive in chunks and text.next_offset must be echoed as offset. That is real behavioral context the annotations cannot convey, though rate limits or text truncation edge cases remain unmentioned.

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?

Two front-loaded sentences: first the resource and its contents, then the paging rule. Dense but no filler, and the most actionable constraint (offset continuation) is stated after the content list where an agent will still see it before calling.

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?

With no output schema, the description must carry return-shape information, and it does — naming the key response sections including next_offset. For a read tool whose safety profile is fully covered by annotations, the remaining gap is only minor detail about how large any single chunk can be.

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 coverage is already 100%, so the baseline is 3; the description earns an extra point by explaining the pagination loop between the offset parameter and the returned next_offset, which the schema alone only hints at. max_tecken and inkludera_text semantics are left entirely to the schema.

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 and resource ('Hämta ett riksdagsdokument') and enumerates the payload: metadata, text, ärendeinformation, undertecknare, motionsyrkanden, reservationer, bilagor. This clearly separates it from sibling search/aggregate tools, though it never explicitly contrasts with get_regering_dokument, which handles the government-side counterpart.

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 implied rather than stated: the agent learns to fetch a document by dok_id from search_dokument and to pass votering_id onward to get_votering. There is no explicit 'use this instead of X when...' guidance and no exclusion of sibling document tools, leaving routing partly to inference.

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.