Search parliamentary documents
euparl_search_documentsSearch 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
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Default search discovers records; get requires document_id and rejects source and all search filters. | search |
| term | No | Parliamentary term 0–10; adopted_texts and committee search only. | |
| text | No | Adopted-texts-only keyword search in the requested language. | |
| year | No | Four-digit document year; adopted_texts and plenary search only. | |
| limit | No | 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. | |
| title | No | Adopted-texts-only title search in the requested language. | |
| offset | No | Zero-based collection offset; default 0. | |
| source | No | Search-only family; omitted search defaults to adopted_texts. Omit entirely in get mode. | |
| language | No | Supported EU ISO-639-1 language, case-insensitive; default en; source text is never translated. | |
| work_type | No | Search-only family-specific code from euparl_list_reference topic document_types; case-insensitive and whitespace-trimmed. | |
| document_id | No | 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. | |
| sitting_date | No | Adopted-texts-only sitting date YYYY-MM-DD; start of range when sitting_date_end is supplied. | |
| sitting_date_end | No | Adopted-texts-only inclusive range end YYYY-MM-DD; requires sitting_date and must not precede it. | |
| related_process_id | No | Adopted-texts-only procedure reference YYYY-NNNN, YYYY/NNNN(TYPE), known prefix or public URI. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cap | No | Effective whole-item page limit. | |
| mode | No | Executed retrieval mode. | |
| page | No | Search continuation metadata; absent in get mode. | |
| error | No | Present when the call failed. Absent on success. | |
| found | No | Get-only publication result; false for missing or empty detail. | |
| items | No | Whole sparse records on a search page; absent in get mode. | |
| shown | No | Whole items shown on this partial page. | |
| notice | No | Publication, language fallback, empty-result or continuation guidance. | |
| source | No | Effective family in search mode; absent in generic get. | |
| document | No | Present only when get finds published detail. | |
| available | No | Whether the selected source array was published, including a published empty array. | |
| truncated | No | True when this page returns only part of the selected collection. | |
| totalCount | No | Exact count only when published or computed over a complete collection. | |
| appliedFilters | No | Actual normalized retrieval scope and filters. |