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, heading tokens or related document. Heading matching covers debate headings only, never body text. relatedDocumentId returns the speeches the source links to a report or interpellation (riksdag_get_document supplies that search as relatedSpeechesCall); a resumed debate’s later segments can lack the link. Search hydrates one text page by default; use get mode with an item speechId to read all remaining text, keeping the returned revision for continuation.

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": "riksdag_search_speeches"
  }
}

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, keeping 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: speeches to hydrate with text, default 1, maximum 5; 0 for metadata only.
speechTypeNoSearch only: all by default; speech excludes replies.
textLengthNoGet only: Unicode code points per text page, default 8000.
textOffsetNoGet only: Unicode code-point offset, default 0.
headingContainsNoSearch only: all-token local heading and subheading filter, ignoring case and diacritics; never body search.
relatedDocumentIdNoSearch only: report (bet) or interpellation (ip) document ID; returns the speeches the source links to it, case-insensitively, including joint debates linking several documents. A resumed debate’s later segments can lack the link; check headingContains with the report title.

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: speech page after local heading and related-document filters.
limitNoApplied search page size after clamp.
offsetNoApplied local row offset.
sourceNoRequired attribution to the Swedish Parliament.
hasMoreNoWhether filtered speech rows remain.
noticesNoApplicable notices, possibly empty.
guidanceNoRecovery guidance for an expected detail miss.
nextCallNoNext local search-page call.
revisionNoSearch candidate-set revision or get detail revision.
speechIdNoGet mode: requested retrieval ID.
textCountNoApplied maximum speeches hydrated with text.
totalCountNoExact count after local heading and related-document filters.
retrievedAtNoSource fetch time; unchanged on cache hits.
returnedCountNoSpeech rows on this page.
upstreamQueryNoUpstream query echo, not proof a filter applied.
candidateCountNoValidated upstream candidate count.
effectiveQueryNoNormalized input, defaults and local filters.
requestedLimitNoRequested search page size.
upstreamWarningsNoSource warnings.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed53 schema fields changed
    • changedInput schema / properties / memberId / description
      Previous value: -"Search only: numeric memberId from riksdag_search_members, retaining leading zeros."New value: +"Search only: numeric memberId from riksdag_search_members, keeping leading zeros."
    • addedInput schema / properties / memberId / pattern
      Added value: +"^\\s*(?:(?:\\d+)\\s*)?$"
    • addedInput schema / properties / relatedDocumentId
      Added value: +{
      +  "description": "Search only: report (bet) or interpellation (ip) document ID; returns the speeches the source links to it, case-insensitively, including joint debates linking several documents. A resumed debate’s later segments can lack the link; check headingContains with the report title.",
      +  "pattern": "^\\s*(?:(?:[A-Za-z\\u00C5\\u00C4\\u00D6\\u00E5\\u00E4\\u00F6\\u212A\\u212B\\u017F][A-Za-z\\u00C5\\u00C4\\u00D6\\u00E5\\u00E4\\u00F6\\u212A\\u212B\\u017F0-9\\u0308\\u030A]{3,}|[A-Za-z\\u212A][A-Za-z\\u212A0-9]19\\d{4}-[1-9]\\d*|[Ss][Ff][Ss]-[Nn]?[1-9]\\d{3}-[1-9]\\d*|(?:[Ss][Ff][Ss]\\s+)?[Nn]?[1-9]\\d{3}:[1-9]\\d*)\\s*)?$",
      +  "type": "string"
      +}
    • addedInput schema / properties / session / pattern
      Added value: +"^\\s*(?:(?:[1-9]\\d{3}(?:\\/(?:\\d{2}|[1-9]\\d{3}))?)\\s*)?$"
    • addedInput schema / properties / speechId / pattern
      Added value: +"^\\s*(?:(?:[A-Za-z][A-Za-z0-9]09\\d+-[1-9]\\d*)\\s*)?$"
    • changedInput schema / properties / textCount / description
      Previous value: -"Search only: maximum speeches to request text for, default 1 and applied maximum 5; 0 returns metadata."New value: +"Search only: speeches to hydrate with text, default 1, maximum 5; 0 for metadata only."
    • changedInput schema / properties / textLength / description
      Previous value: -"Get only: requested Unicode code points; defaults start at 8000 and fit the complete response; explicit lengths are honored."New value: +"Get only: Unicode code points per text page, default 8000."
    • addedOutput schema / $defs
      Added value: +{
      +  "RiksdagSpeechItem": {
      +    "additionalProperties": false,
      +    "description": "Speech metadata and explicit text retrieval state.",
      +    "properties": {
      +      "activity": {
      +        "description": "Published chamber activity.",
      +        "type": "string"
      +      },
      +      "date": {
      +        "description": "Published date or date-time with source precision.",
      +        "type": "string"
      +      },
      +      "heading": {
      +        "description": "Published debate heading.",
      +        "type": "string"
      +      },
      +      "memberId": {
      +        "description": "Published member IID, including leading zeros.",
      +        "type": "string"
      +      },
      +      "nextTextCall": {
      +        "additionalProperties": false,
      +        "description": "Get call for deferred or remaining body text.",
      +        "properties": {
      +          "args": {
      +            "additionalProperties": {},
      +            "description": "Complete normalized arguments for riksdag_search_speeches, valid against its input schema; pass back unchanged.",
      +            "properties": {},
      +            "type": "object"
      +          },
      +          "toolName": {
      +            "const": "riksdag_search_speeches",
      +            "description": "Tool to call next.",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "toolName",
      +          "args"
      +        ],
      +        "type": "object"
      +      },
      +      "party": {
      +        "description": "Published party code.",
      +        "type": "string"
      +      },
      +      "protocolDocumentId": {
      +        "description": "Document ID of the chamber protocol.",
      +        "type": "string"
      +      },
      +      "protocolTitle": {
      +        "description": "Published protocol title.",
      +        "type": "string"
      +      },
      +      "protocolUrl": {
      +        "description": "Published protocol link and speech anchor.",
      +        "type": "string"
      +      },
      +      "relatedDocumentId": {
      +        "description": "Source-linked related document ID in canonical form, or a \", \"-separated list for joint debates.",
      +        "type": "string"
      +      },
      +      "reply": {
      +        "description": "Whether the source explicitly marks this as a reply.",
      +        "type": "boolean"
      +      },
      +      "session": {
      +        "description": "Published parliamentary session.",
      +        "type": "string"
      +      },
      +      "sourceHtmlUrl": {
      +        "description": "Published speech HTML link.",
      +        "type": "string"
      +      },
      +      "sourceSpeechId": {
      +        "description": "Source speech UUID, distinct from the retrieval ID.",
      +        "type": "string"
      +      },
      +      "sourceUrl": {
      +        "description": "Fixed-origin speech detail source link.",
      +        "type": "string"
      +      },
      +      "speaker": {
      +        "description": "Published speaker name and title.",
      +        "type": "string"
      +      },
      +      "speechId": {
      +        "description": "Retrieval ID for get mode; protocol document ID and speech number.",
      +        "type": "string"
      +      },
      +      "subheading": {
      +        "description": "Published debate subheading.",
      +        "type": "string"
      +      },
      +      "text": {
      +        "description": "Canonical Markdown body page, code-point exact.",
      +        "type": "string"
      +      },
      +      "textFailure": {
      +        "additionalProperties": false,
      +        "description": "Explicit transient detail failure; never an empty-body assertion.",
      +        "properties": {
      +          "code": {
      +            "description": "Transient upstream error code.",
      +            "type": "number"
      +          },
      +          "reason": {
      +            "description": "Stable transient failure reason.",
      +            "type": "string"
      +          },
      +          "recovery": {
      +            "description": "How to retry this speech detail.",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "code",
      +          "reason",
      +          "recovery"
      +        ],
      +        "type": "object"
      +      },
      +      "textHasMore": {
      +        "description": "Whether canonical body text remains.",
      +        "type": "boolean"
      +      },
      +      "textOffset": {
      +        "description": "Applied code-point offset.",
      +        "type": "number"
      +      },
      +      "textReturnedLength": {
      +        "description": "Code points returned in this page.",
      +        "type": "number"
      +      },
      +      "textRevision": {
      +        "description": "Revision of the normalized detail record and canonical body.",
      +        "type": "string"
      +      },
      +      "textState": {
      +        "description": "Whether text is included, deferred, unpublished or failed to load.",
      +        "enum": [
      +          "included",
      +          "not_requested",
      +          "unavailable",
      +          "failed"
      +        ],
      +        "type": "string"
      +      },
      +      "textTotalLength": {
      +        "description": "Total canonical body length, code points.",
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "speechId",
      +      "protocolDocumentId",
      +      "sourceUrl",
      +      "textState"
      +    ],
      +    "type": "object"
      +  }
      +}
    • changedOutput schema / properties / candidateCount / description
      Previous value: -"Complete validated upstream candidate count."New value: +"Validated upstream candidate count."
    • changedOutput schema / properties / effectiveQuery / description
      Previous value: -"Deterministic normalized input, applied defaults and local filters."New value: +"Normalized input, defaults and local filters."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `invalid_filter`: Unknown code, conflicting mode fields or malformed identifier. `revision_changed`: Continuation revision no longer matches. `upstream_identity_mismatch`: Detail identity/filter rows contradict required identity. `upstream_schema_invalid`: Present payload violates wire contract. `upstream_unavailable`: Network/5xx or HTML error page after retries. `upstream_queue_full`: Process upstream queue is full. `candidate_limit_reached`: Complete-list safety boundary reached. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `invalid_filter`: Unknown party code, nonconsecutive session, punctuation-only headingContains or conflicting mode fields. `revision_changed`: Revision no longer matches. `upstream_identity_mismatch`: Source rows contradict the required identity. `upstream_schema_invalid`: Payload violates the wire contract. `upstream_unavailable`: Source unavailable after retries. `upstream_queue_full`: Upstream queue is full. `candidate_limit_reached`: Complete-list safety limit reached. Other values are possible when a failure originates below the handler."
    • addedOutput schema / properties / item / $ref
      Added value: +"#/$defs/RiksdagSpeechItem"
    • removedOutput schema / properties / item / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / item / properties
      Removed value: -{
      -  "activity": {
      -    "description": "Published chamber activity.",
      -    "type": "string"
      -  },
      -  "date": {
      -    "description": "Published date or date-time with source precision.",
      -    "type": "string"
      -  },
      -  "heading": {
      -    "description": "Published debate heading.",
      -    "type": "string"
      -  },
      -  "memberId": {
      -    "description": "Published member IID, including leading zeros.",
      -    "type": "string"
      -  },
      -  "nextTextCall": {
      -    "additionalProperties": false,
      -    "description": "Complete get call to retrieve deferred or remaining body text.",
      -    "properties": {
      -      "args": {
      -        "additionalProperties": false,
      -        "description": "Complete get-mode continuation arguments.",
      -        "properties": {
      -          "mode": {
      -            "const": "get",
      -            "description": "Read a single speech.",
      -            "type": "string"
      -          },
      -          "revision": {
      -            "description": "Complete detail record revision.",
      -            "type": "string"
      -          },
      -          "speechId": {
      -            "description": "Exact speech retrieval ID.",
      -            "type": "string"
      -          },
      -          "textLength": {
      -            "description": "Explicit text-page size when supplied.",
      -            "type": "number"
      -          },
      -          "textOffset": {
      -            "description": "Next Unicode code-point offset.",
      -            "type": "number"
      -          }
      -        },
      -        "required": [
      -          "mode",
      -          "speechId"
      -        ],
      -        "type": "object"
      -      },
      -      "toolName": {
      -        "const": "riksdag_search_speeches",
      -        "description": "Tool to call for speech text.",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "toolName",
      -      "args"
      -    ],
      -    "type": "object"
      -  },
      -  "party": {
      -    "description": "Published party code.",
      -    "type": "string"
      -  },
      -  "protocolDocumentId": {
      -    "description": "Document ID of the chamber protocol.",
      -    "type": "string"
      -  },
      -  "protocolTitle": {
      -    "description": "Published protocol title.",
      -    "type": "string"
      -  },
      -  "protocolUrl": {
      -    "description": "Published protocol link and speech anchor.",
      -    "type": "string"
      -  },
      -  "relatedDocumentId": {
      -    "description": "Source-linked related document ID.",
      -    "type": "string"
      -  },
      -  "reply": {
      -    "description": "Whether the source explicitly marks this as a reply.",
      -    "type": "boolean"
      -  },
      -  "session": {
      -    "description": "Published parliamentary session.",
      -    "type": "string"
      -  },
      -  "sourceHtmlUrl": {
      -    "description": "Published speech HTML link.",
      -    "type": "string"
      -  },
      -  "sourceSpeechId": {
      -    "description": "Source speech UUID, distinct from the retrieval ID.",
      -    "type": "string"
      -  },
      -  "sourceUrl": {
      -    "description": "Fixed-origin speech detail source link.",
      -    "type": "string"
      -  },
      -  "speaker": {
      -    "description": "Published speaker name and title.",
      -    "type": "string"
      -  },
      -  "speechId": {
      -    "description": "Retrieval ID for get mode; protocol document ID and speech number.",
      -    "type": "string"
      -  },
      -  "subheading": {
      -    "description": "Published debate subheading.",
      -    "type": "string"
      -  },
      -  "text": {
      -    "description": "Canonical Markdown body page, preserving Unicode code points.",
      -    "type": "string"
      -  },
      -  "textFailure": {
      -    "additionalProperties": false,
      -    "description": "Explicit transient detail failure; never an empty-body assertion.",
      -    "properties": {
      -      "code": {
      -        "description": "Classified transient upstream error code.",
      -        "type": "number"
      -      },
      -      "reason": {
      -        "description": "Stable transient failure reason.",
      -        "type": "string"
      -      },
      -      "recovery": {
      -        "description": "How to retry this speech detail.",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "code",
      -      "reason",
      -      "recovery"
      -    ],
      -    "type": "object"
      -  },
      -  "textHasMore": {
      -    "description": "Whether canonical body text remains.",
      -    "type": "boolean"
      -  },
      -  "textOffset": {
      -    "description": "Applied Unicode code-point offset.",
      -    "type": "number"
      -  },
      -  "textReturnedLength": {
      -    "description": "Code points returned in this page.",
      -    "type": "number"
      -  },
      -  "textRevision": {
      -    "description": "Complete normalized detail record and canonical body revision.",
      -    "type": "string"
      -  },
      -  "textState": {
      -    "description": "Whether text is included, deferred, unpublished or failed to load.",
      -    "enum": [
      -      "included",
      -      "not_requested",
      -      "unavailable",
      -      "failed"
      -    ],
      -    "type": "string"
      -  },
      -  "textTotalLength": {
      -    "description": "Complete canonical body length in Unicode code points.",
      -    "type": "number"
      -  }
      -}
    • removedOutput schema / properties / item / required
      Removed value: -[
      -  "speechId",
      -  "protocolDocumentId",
      -  "sourceUrl",
      -  "textState"
      -]
    • removedOutput schema / properties / item / type
      Removed value: -"object"
    • changedOutput schema / properties / items / description
      Previous value: -"Search mode: local speech page after heading filtering."New value: +"Search mode: speech page after local heading and related-document filters."
    • addedOutput schema / properties / items / items / $ref
      Added value: +"#/$defs/RiksdagSpeechItem"
    • removedOutput schema / properties / items / items / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / items / items / description
      Removed value: -"Speech metadata and explicit text retrieval state."
    • removedOutput schema / properties / items / items / properties
      Removed value: -{
      -  "activity": {
      -    "description": "Published chamber activity.",
      -    "type": "string"
      -  },
      -  "date": {
      -    "description": "Published date or date-time with source precision.",
      -    "type": "string"
      -  },
      -  "heading": {
      -    "description": "Published debate heading.",
      -    "type": "string"
      -  },
      -  "memberId": {
      -    "description": "Published member IID, including leading zeros.",
      -    "type": "string"
      -  },
      -  "nextTextCall": {
      -    "additionalProperties": false,
      -    "description": "Complete get call to retrieve deferred or remaining body text.",
      -    "properties": {
      -      "args": {
      -        "additionalProperties": false,
      -        "description": "Complete get-mode continuation arguments.",
      -        "properties": {
      -          "mode": {
      -            "const": "get",
      -            "description": "Read a single speech.",
      -            "type": "string"
      -          },
      -          "revision": {
      -            "description": "Complete detail record revision.",
      -            "type": "string"
      -          },
      -          "speechId": {
      -            "description": "Exact speech retrieval ID.",
      -            "type": "string"
      -          },
      -          "textLength": {
      -            "description": "Explicit text-page size when supplied.",
      -            "type": "number"
      -          },
      -          "textOffset": {
      -            "description": "Next Unicode code-point offset.",
      -            "type": "number"
      -          }
      -        },
      -        "required": [
      -          "mode",
      -          "speechId"
      -        ],
      -        "type": "object"
      -      },
      -      "toolName": {
      -        "const": "riksdag_search_speeches",
      -        "description": "Tool to call for speech text.",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "toolName",
      -      "args"
      -    ],
      -    "type": "object"
      -  },
      -  "party": {
      -    "description": "Published party code.",
      -    "type": "string"
      -  },
      -  "protocolDocumentId": {
      -    "description": "Document ID of the chamber protocol.",
      -    "type": "string"
      -  },
      -  "protocolTitle": {
      -    "description": "Published protocol title.",
      -    "type": "string"
      -  },
      -  "protocolUrl": {
      -    "description": "Published protocol link and speech anchor.",
      -    "type": "string"
      -  },
      -  "relatedDocumentId": {
      -    "description": "Source-linked related document ID.",
      -    "type": "string"
      -  },
      -  "reply": {
      -    "description": "Whether the source explicitly marks this as a reply.",
      -    "type": "boolean"
      -  },
      -  "session": {
      -    "description": "Published parliamentary session.",
      -    "type": "string"
      -  },
      -  "sourceHtmlUrl": {
      -    "description": "Published speech HTML link.",
      -    "type": "string"
      -  },
      -  "sourceSpeechId": {
      -    "description": "Source speech UUID, distinct from the retrieval ID.",
      -    "type": "string"
      -  },
      -  "sourceUrl": {
      -    "description": "Fixed-origin speech detail source link.",
      -    "type": "string"
      -  },
      -  "speaker": {
      -    "description": "Published speaker name and title.",
      -    "type": "string"
      -  },
      -  "speechId": {
      -    "description": "Retrieval ID for get mode; protocol document ID and speech number.",
      -    "type": "string"
      -  },
      -  "subheading": {
      -    "description": "Published debate subheading.",
      -    "type": "string"
      -  },
      -  "text": {
      -    "description": "Canonical Markdown body page, preserving Unicode code points.",
      -    "type": "string"
      -  },
      -  "textFailure": {
      -    "additionalProperties": false,
      -    "description": "Explicit transient detail failure; never an empty-body assertion.",
      -    "properties": {
      -      "code": {
      -        "description": "Classified transient upstream error code.",
      -        "type": "number"
      -      },
      -      "reason": {
      -        "description": "Stable transient failure reason.",
      -        "type": "string"
      -      },
      -      "recovery": {
      -        "description": "How to retry this speech detail.",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "code",
      -      "reason",
      -      "recovery"
      -    ],
      -    "type": "object"
      -  },
      -  "textHasMore": {
      -    "description": "Whether canonical body text remains.",
      -    "type": "boolean"
      -  },
      -  "textOffset": {
      -    "description": "Applied Unicode code-point offset.",
      -    "type": "number"
      -  },
      -  "textReturnedLength": {
      -    "description": "Code points returned in this page.",
      -    "type": "number"
      -  },
      -  "textRevision": {
      -    "description": "Complete normalized detail record and canonical body revision.",
      -    "type": "string"
      -  },
      -  "textState": {
      -    "description": "Whether text is included, deferred, unpublished or failed to load.",
      -    "enum": [
      -      "included",
      -      "not_requested",
      -      "unavailable",
      -      "failed"
      -    ],
      -    "type": "string"
      -  },
      -  "textTotalLength": {
      -    "description": "Complete canonical body length in Unicode code points.",
      -    "type": "number"
      -  }
      -}
    • removedOutput schema / properties / items / items / required
      Removed value: -[
      -  "speechId",
      -  "protocolDocumentId",
      -  "sourceUrl",
      -  "textState"
      -]
    • removedOutput schema / properties / items / items / type
      Removed value: -"object"
    • changedOutput schema / properties / limit / description
      Previous value: -"Applied search page size after clamp and response fitting."New value: +"Applied search page size after clamp."
    • changedOutput schema / properties / nextCall / description
      Previous value: -"Complete next local search-page call."New value: +"Next local search-page call."
    • changedOutput schema / properties / nextCall / properties / args / additionalProperties
      Previous value: -falseNew value: +{}
    • changedOutput schema / properties / nextCall / properties / args / description
      Previous value: -"Complete normalized next-page arguments."New value: +"Complete normalized arguments for riksdag_search_speeches, valid against its input schema; pass back unchanged."
    • removedOutput schema / properties / nextCall / properties / args / properties / headingContains
      Removed value: -{
      -  "description": "Search only: all-token local heading and subheading filter, ignoring case and diacritics; never body search.",
      -  "type": "string"
      -}
    • removedOutput schema / properties / nextCall / properties / args / properties / limit
      Removed value: -{
      -  "description": "Search only: requested rows, default 5 and applied maximum 20.",
      -  "maximum": 9007199254740991,
      -  "minimum": 1,
      -  "type": "integer"
      -}
    • removedOutput schema / properties / nextCall / properties / args / properties / memberId
      Removed value: -{
      -  "description": "Search only: numeric memberId from riksdag_search_members, retaining leading zeros.",
      -  "type": "string"
      -}
    • removedOutput schema / properties / nextCall / properties / args / properties / mode
      Removed value: -{
      -  "description": "Search by default; get reads one retrieval speechId.",
      -  "enum": [
      -    "search",
      -    "get"
      -  ],
      -  "type": "string"
      -}
    • removedOutput schema / properties / nextCall / properties / args / properties / offset
      Removed value: -{
      -  "description": "Search only: local row offset, default 0.",
      -  "maximum": 9007199254740991,
      -  "minimum": 0,
      -  "type": "integer"
      -}
    • removedOutput schema / properties / nextCall / properties / args / properties / party
      Removed value: -{
      -  "description": "Search only: official party code or exact reference label.",
      -  "type": "string"
      -}
    • removedOutput schema / properties / nextCall / properties / args / properties / revision
      Removed value: -{
      -  "description": "Search candidate revision or get textRevision copied from the preceding page.",
      -  "type": "string"
      -}
    • removedOutput schema / properties / nextCall / properties / args / properties / session
      Removed value: -{
      -  "description": "Required in search mode; parliamentary session such as 2024/25.",
      -  "type": "string"
      -}
    • removedOutput schema / properties / nextCall / properties / args / properties / speechId
      Removed value: -{
      -  "description": "Required in get mode: retrieval ID copied from a search item, never the source UUID.",
      -  "type": "string"
      -}
    • removedOutput schema / properties / nextCall / properties / args / properties / speechType
      Removed value: -{
      -  "description": "Search only: all by default; speech excludes replies.",
      -  "enum": [
      -    "all",
      -    "speech"
      -  ],
      -  "type": "string"
      -}
    • removedOutput schema / properties / nextCall / properties / args / properties / textCount
      Removed value: -{
      -  "description": "Search only: maximum speeches to request text for, default 1 and applied maximum 5; 0 returns metadata.",
      -  "maximum": 9007199254740991,
      -  "minimum": 0,
      -  "type": "integer"
      -}
    • removedOutput schema / properties / nextCall / properties / args / properties / textLength
      Removed value: -{
      -  "description": "Get only: requested Unicode code points; defaults start at 8000 and fit the complete response; explicit lengths are honored.",
      -  "maximum": 9007199254740991,
      -  "minimum": 1,
      -  "type": "integer"
      -}
    • removedOutput schema / properties / nextCall / properties / args / properties / textOffset
      Removed value: -{
      -  "description": "Get only: Unicode code-point offset, default 0.",
      -  "maximum": 9007199254740991,
      -  "minimum": 0,
      -  "type": "integer"
      -}
    • changedOutput schema / properties / nextCall / properties / toolName / description
      Previous value: -"Tool to call for the next local row page."New value: +"Tool to call next."
    • changedOutput schema / properties / notices / description
      Previous value: -"All applicable notices, including an empty list."New value: +"Applicable notices, possibly empty."
    • changedOutput schema / properties / notices / items / description
      Previous value: -"A source limitation, applied bound or next-step notice."New value: +"A limitation, applied bound or next-step notice."
    • changedOutput schema / properties / requestedLimit / description
      Previous value: -"Original requested search page size."New value: +"Requested search page size."
    • changedOutput schema / properties / retrievedAt / description
      Previous value: -"Source fetch time, retained unchanged on cache hits."New value: +"Source fetch time; unchanged on cache hits."
    • changedOutput schema / properties / returnedCount / description
      Previous value: -"Speech rows returned on this page."New value: +"Speech rows on this page."
    • changedOutput schema / properties / revision / description
      Previous value: -"Search candidate-set revision or complete get detail revision."New value: +"Search candidate-set revision or get detail revision."
    • changedOutput schema / properties / textCount / description
      Previous value: -"Applied maximum speeches selected for text retrieval."New value: +"Applied maximum speeches hydrated with text."
    • changedOutput schema / properties / totalCount / description
      Previous value: -"Exact local heading-filtered match count."New value: +"Exact count after local heading and related-document filters."
    • removedOutput schema / properties / truncated
      Removed value: -{
      -  "description": "Whether response fitting shortened the local row page.",
      -  "type": "boolean"
      -}
    • changedOutput schema / properties / upstreamQuery / description
      Previous value: -"Upstream query echo; not proof that a filter was applied."New value: +"Upstream query echo, not proof a filter applied."
    • changedOutput schema / properties / upstreamWarnings / description
      Previous value: -"Warnings supplied by the source."New value: +"Source warnings."
    • changedOutput schema / properties / upstreamWarnings / items / description
      Previous value: -"An upstream warning preserved verbatim."New value: +"An upstream warning, verbatim."
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the readOnly/openWorld/idempotent annotations, it discloses important behavior: search hydrates only one text page by default, get mode pages through remaining text, and the returned revision is used for continuation. It also warns that heading matching covers debate headings only and that resumed debates may lack document links, which are non-obvious operational details.

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 front-loaded with the primary search purpose and then adds only the caveats and mode behavior an agent needs. Despite the tool's complexity, the wording is dense but purposeful, with no redundant restatement of schema fields.

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 14 parameters, dual modes, rich schema descriptions, and an output schema, the description supplies the remaining behavioral context: search/get routing, hydration defaults, continuation revisions, heading-only matching, and related-document edge cases. Nothing critical for correct invocation appears missing.

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 100%, so parameter descriptions already carry the baseline detail. The description adds useful cross-parameter meaning: session is required in search mode, speechId drives get mode, revision supports continuation, text hydration is paged, and relatedDocumentId returns linked speeches with caveats about resumed debates.

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 uses a specific verb and resource: search parliamentary speeches within a required session, with an explicit get mode for reading full text. It clearly separates speech search from document search by naming speeches and by explaining the relatedDocumentId relationship to riksdag_get_document.

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?

It gives clear mode guidance: search by default, then use get mode with an item speechId to read remaining text and keep the revision for continuation. It also states that headingContains applies only to headings, not body text. It stops short of explicit when-not-to-use or alternative-tool exclusions, so it is strong but not exhaustive.

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.