Skip to main content
Glama

sweden-parliament-mcp-server

Search and read parliamentary speeches

riksdag_search_speeches
Read-onlyIdempotent

Search speeches within a required parliamentary session, optionally by member, party, reply exclusion and heading tokens. Heading matching searches debate headings only, never body text. Search hydrates one text page by default; use get mode with an item speechId to read all remaining text and retain the returned revision for continuation.

Input Schema

NameRequiredDescriptionDefault
modeNoSearch by default; get reads one retrieval speechId.
limitNoSearch only: requested rows, default 5 and applied maximum 20.
partyNoSearch only: official party code or exact reference label.
offsetNoSearch only: local row offset, default 0.
sessionNoRequired in search mode; parliamentary session such as 2024/25.
memberIdNoSearch only: numeric memberId from riksdag_search_members, retaining leading zeros.
revisionNoSearch candidate revision or get textRevision copied from the preceding page.
speechIdNoRequired in get mode: retrieval ID copied from a search item, never the source UUID.
textCountNoSearch only: maximum speeches to request text for, default 1 and applied maximum 5; 0 returns metadata.
speechTypeNoSearch only: all by default; speech excludes replies.
textLengthNoGet only: requested Unicode code points; defaults start at 8000 and fit the complete response; explicit lengths are honored.
textOffsetNoGet only: Unicode code-point offset, default 0.
headingContainsNoSearch only: all-token local heading and subheading filter, ignoring case and diacritics; never body search.

Output Schema

NameRequiredDescriptionDefault
itemNoGet mode: exact speech metadata and text page.
modeNoApplied search or detail mode.
errorNoPresent when the call failed. Absent on success.
foundNoGet mode: whether the retrieval ID exists.
itemsNoSearch mode: local speech page after heading filtering.
limitNoApplied search page size after clamp and response fitting.
offsetNoApplied local row offset.
sourceNoRequired attribution to the Swedish Parliament.
hasMoreNoWhether filtered speech rows remain.
noticesNoAll applicable notices, including an empty list.
guidanceNoRecovery guidance for an expected detail miss.
nextCallNoComplete next local search-page call.
revisionNoSearch candidate-set revision or complete get detail revision.
speechIdNoGet mode: requested retrieval ID.
textCountNoApplied maximum speeches selected for text retrieval.
truncatedNoWhether response fitting shortened the local row page.
totalCountNoExact local heading-filtered match count.
retrievedAtNoSource fetch time, retained unchanged on cache hits.
returnedCountNoSpeech rows returned on this page.
upstreamQueryNoUpstream query echo; not proof that a filter was applied.
candidateCountNoComplete validated upstream candidate count.
effectiveQueryNoDeterministic normalized input, applied defaults and local filters.
requestedLimitNoOriginal requested search page size.
upstreamWarningsNoWarnings supplied by the source.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A5/5.0
Behavior5/5

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

Beyond the safety hints provided in annotations, the description specifies crucial operational behaviors: heading matching applies only to debate headings, never the body text. It also details the default hydration behavior of a single page.

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 dense with critical information but highly structured. Both sentences serve distinct, necessary purposes: the first establishing scope and options, and the second detailing retrieval mechanics and workflow.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of the 13 parameters and the dual functionality (search/get), the description provides necessary boundaries and operational context (e.g., 'heading matches debate headings only') that a standalone schema cannot convey.

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

Parameters5/5

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

Although the schema is comprehensive, the description adds semantic meaning by clustering the parameters into operational stages (Search options vs. Read/Hydrate mechanics). This links the parameters functionally rather than just describing them individually.

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 identifies the resource (speeches) and the primary action (search within a required parliamentary session). It distinguishes itself by detailing optional filters (member, party, heading tokens) and implicitly separating its function from general document search tools via the context provided.

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?

It provides an explicit workflow, explaining the difference between 'search' mode (default, hydrating one text page) and 'get' mode (used with `speechId` to continue reading). This guides the agent on the correct sequence of tool usage.

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.