Skip to main content
Glama

Search parliamentary documents

euparl_search_documents
Read-onlyIdempotent

Search adopted texts, committee documents, or plenary documents, then retrieve metadata and source-file links with mode get and document_id. Get accepts IDs from procedures, speeches, votes, questions and answers without a source family; parent_document_ids lead from subdivisions to parent files. Detail preserves adopted_document_ids, based_on_document_ids and public_register_ref; follow published document relations with mode get, while preserving ordinary missing-record and upstream-error outcomes for unavailable targets. Detail procedure_ids also read the procedure an adopted text, plenary or committee document publishes on its family record; adopted and based-on document relations never imply procedure links. Only adopted_texts supports text, title, sitting dates and related_process_id. Committee supports term but no year; plenary supports year but no term. Use euparl_list_reference topic document_types for family-specific work_type codes. Detail returns links, not extracted full text. Adopted-text rows carry title in the requested language, date and procedure_ids; committee and plenary rows carry identity only. An adopted-text page holds at most 100 rows. Non-keyword adopted texts use doc-id:asc and aligned 100-row upstream pages independently of caller limit. Keyword searches retain relevance order and can repeat or omit records across pages. Adopted texts expose at most 10000 search results; continue with page.next_offset when present, otherwise narrow supported filters.

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

Input Schema

NameRequiredDescriptionDefault
modeNoDefault search discovers records; get requires document_id and rejects source and all search filters.search
termNoParliamentary term 0–10; adopted_texts and committee search only.
textNoAdopted-texts-only keyword search in the requested language.
yearNoFour-digit document year; adopted_texts and plenary search only.
limitNoWhole items requested; default 20. Bounded-mode acquisition limits: 1000 documents, 100 adopted texts, or 100 keyword adopted texts. Larger bounded-mode limits normalize with a notice. Values above the safe-integer range normalize to 9007199254740991; search windows and bounded modes may narrow further.
titleNoAdopted-texts-only title search in the requested language.
offsetNoZero-based collection offset; default 0.
sourceNoSearch-only family; omitted search defaults to adopted_texts. Omit entirely in get mode.
languageNoSupported EU ISO-639-1 language, case-insensitive; default en; source text is never translated.
work_typeNoSearch-only family-specific code from euparl_list_reference topic document_types; case-insensitive and whitespace-trimmed.
document_idNoGet-only work ID from any tool, no family restriction: canonical ID (TA-9-2024-0138), eli/dl/doc/ prefix or exact public URI, in any letter case, or a returned citation (label, public_register_ref or decision label): T9-0138/2024, P9_TA(2024)0138, A9-0188/2023, P9_A(2023)0188, B9-0163/2024 (read as B-, else the QOB- question motion), RC-B9-0163/2024 or P9_OJQ(2024)03-13. Question citations belong to euparl_list_questions.
sitting_dateNoAdopted-texts-only sitting date YYYY-MM-DD; start of range when sitting_date_end is supplied.
sitting_date_endNoAdopted-texts-only inclusive range end YYYY-MM-DD; requires sitting_date and must not precede it.
related_process_idNoAdopted-texts-only procedure reference YYYY-NNNN, YYYY/NNNN(TYPE), known prefix or public URI.

Output Schema

NameRequiredDescriptionDefault
capNoEffective whole-item page limit.
modeNoExecuted retrieval mode.
pageNoSearch continuation metadata; absent in get mode.
errorNoPresent when the call failed. Absent on success.
foundNoGet-only publication result; false for missing or empty detail.
itemsNoWhole sparse records on a search page; absent in get mode.
shownNoWhole items shown on this partial page.
noticeNoPublication, language fallback, empty-result or continuation guidance.
sourceNoEffective family in search mode; absent in generic get.
documentNoPresent only when get finds published detail.
availableNoWhether the selected source array was published, including a published empty array.
truncatedNoTrue when this page returns only part of the selected collection.
totalCountNoExact count only when published or computed over a complete collection.
appliedFiltersNoActual normalized retrieval scope and filters.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / properties / document_id / description
      Previous value: -"Get-only canonical work ID, eli/dl/doc/ prefix or exact public URI; no family restriction."New value: +"Get-only work ID from any tool, no family restriction: canonical ID (TA-9-2024-0138), eli/dl/doc/ prefix or exact public URI, in any letter case, or a returned citation (label, public_register_ref or decision label): T9-0138/2024, P9_TA(2024)0138, A9-0188/2023, P9_A(2023)0188, B9-0163/2024 (read as B-, else the QOB- question motion), RC-B9-0163/2024 or P9_OJQ(2024)03-13. Question citations belong to euparl_list_questions."
    • changedInput schema / properties / limit / description
      Previous value: -"Whole items requested; default 20. Bounded-mode acquisition limits: 1000 documents, 10000 adopted texts, or 1000 keyword adopted texts. Larger bounded-mode limits normalize with a notice. Values above the safe-integer range normalize to 9007199254740991; search windows and bounded modes may narrow further."New value: +"Whole items requested; default 20. Bounded-mode acquisition limits: 1000 documents, 100 adopted texts, or 100 keyword adopted texts. Larger bounded-mode limits normalize with a notice. Values above the safe-integer range normalize to 9007199254740991; search windows and bounded modes may narrow further."
    • changedOutput schema / properties / items / items / description
      Previous value: -"Sparse document discovery record; title and dates require detail retrieval."New value: +"Document discovery record. Adopted-text rows add title, date and procedure_ids; committee and plenary rows carry identity only, so their title and date need mode get."
    • addedOutput schema / properties / items / items / properties / date
      Added value: +{
      +  "description": "Adopted-text rows only: published document date.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / items / items / properties / procedure_ids
      Added value: +{
      +  "description": "Adopted-text rows only: procedures named by the published family relation, canonical, in published order, sitting events left out, as detail reads them. Use euparl_get_procedure.",
      +  "items": {
      +    "description": "Canonical procedure identifier.",
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / items / items / properties / title
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Adopted-text rows only: published title in the requested language, the only one the list returns; absent when the row has none (the notice counts them; mode get reads a title in another language).",
      +  "properties": {
      +    "language": {
      +      "description": "Actual language of the published text.",
      +      "type": "string"
      +    },
      +    "value": {
      +      "description": "Exact published text.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "value",
      +    "language"
      +  ],
      +  "type": "object"
      +}
  2. Changed2 schema fields changed
    • changedInput schema / properties / limit / description
      Previous value: -"Whole items requested; default 20. Pages hold at most 225 documents; a larger limit returns that many with a notice."New value: +"Whole items requested; default 20. Bounded-mode acquisition limits: 1000 documents, 10000 adopted texts, or 1000 keyword adopted texts. Larger bounded-mode limits normalize with a notice. Values above the safe-integer range normalize to 9007199254740991; search windows and bounded modes may narrow further."
    • changedOutput schema / properties / page / properties / limit / description
      Previous value: -"Effective whole-item page size: the requested limit, clamped to the collection's page cap and, on a 10000-result search, to the results left in the window."New value: +"Effective whole-item page size after acquisition bounds, safe-integer normalization and any search-result window. Local collections retain all requested whole items or remaining rows."
  3. Changed1 schema field changed
    • changedOutput schema / properties / document / properties / procedure_ids / description
      Previous value: -"Procedure IDs from explicit source relationships; use euparl_get_procedure."New value: +"Procedure IDs from explicit source relations, then those an adopted text, plenary or committee document publishes on its family record, without repeats; use euparl_get_procedure."
  4. Changed6 schema fields changed
    • changedInput schema / properties / limit / description
      Previous value: -"Whole items requested; default 20, effective maximum 100 with notice."New value: +"Whole items requested; default 20. Pages hold at most 225 documents; a larger limit returns that many with a notice."
    • removedInput schema / properties / limit / maximum
      Removed value: -1000
    • addedInput schema / properties / limit / multipleOf
      Added value: +1
    • changedInput schema / properties / limit / type
      Previous value: -"integer"New value: +"number"
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `invalid_filter`: A code, identifier, language, date range or source-specific filter is unsupported, or adopted-text offset plus effective limit exceeds the 10000-result search window. `invalid_mode_fields`: Get lacks document_id, mixes search filters, or uses nondefault paging; search supplies document_id. `upstream_rejected`: Parliament rejects validated request parameters. `upstream_rate_limited`: Parliament rate limits persist after bounded retries. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `invalid_filter`: A code, identifier, language, date range or source-specific filter is unsupported, or an adopted-text offset is 10000 or more, past the 10000-result search window. `invalid_mode_fields`: Get lacks document_id, mixes search filters, or uses nondefault paging; search supplies document_id. `upstream_rejected`: Parliament rejects validated request parameters. `upstream_rate_limited`: Parliament rate limits persist after bounded retries. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / page / properties / limit / description
      Previous value: -"Effective whole-item page size, at most 100."New value: +"Effective whole-item page size: the requested limit, clamped to the collection's page cap and, on a 10000-result search, to the results left in the window."
  5. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent, open-world, but the description adds substantial behavior beyond them: adopted-text pages cap at 100 rows, non-keyword adopted texts use doc-id:asc with aligned 100-row upstream pages independent of caller limit, keyword searches keep relevance order and can repeat or omit records across pages, a 10000-result ceiling applies, and continuation is via page.next_offset. It also discloses that detail returns links rather than extracted full text and that missing-record/upstream-error outcomes are preserved — exactly the kind of context annotations cannot carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and the mode=get path are front-loaded, which is good, but the body is a wall of comma-spliced caveats where individual sentences (e.g. the one about preserving missing-record outcomes while following published relations) require re-reading to parse. Every fact is arguably relevant, yet the density and lack of structural separation work against quick consumption.

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?

For a 14-parameter, three-family tool with two modes, the description covers mode constraints, per-family filter legality, pagination limits, result ceilings, continuation, and what detail actually returns. Even though an output schema exists, the extra detail on row contents and link-only results removes remaining ambiguity about what an agent will get back.

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 the baseline is 3; the description earns more by adding semantics the schema lacks, such as which parameters are legal per source family, that get accepts IDs from procedures/speeches/votes/questions with no family restriction, and that parent_document_ids lead from subdivisions to parent files. Some of the relation prose (adopted_document_ids, based_on_document_ids, procedure_ids) is hard to map onto specific parameters, which keeps it from a 5.

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?

The opening sentence gives a concrete verb and three named resource families, then explicitly covers the second mode (get with document_id) that retrieves metadata and source-file links. An agent can tell this is the document-search/retrieval entry point rather than a procedure or speech tool. It stops short of 5 because the purpose statement is followed by a dense run of caveats that dilute the initial signal.

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 description gives real routing guidance: family-specific filter support (only adopted_texts takes text/title/sitting dates/related_process_id; committee takes term not year; plenary takes year not term), pointer to euparl_list_reference topic document_types for work_type codes, and a note that question citations belong to euparl_list_questions. It does not, however, state when to prefer this over euparl_search_speeches or euparl_get_procedure, so no explicit alternative-routing statement exists.

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.