Raw tool arguments, validated against SearchDocumentsSchema
MCP tool result containing matching legislative documents or a single document
args fails schema validation (e.g., keyword exceeds 200 chars, bad date format)// Full-text keyword search with filters
const result = await handleSearchDocuments({
keyword: 'climate change',
documentType: 'REPORT',
dateFrom: '2024-01-01',
limit: 20
});
// Returns up to 20 EP reports matching "climate change" from 2024 onwards
// Single document lookup by ID
const doc = await handleSearchDocuments({ docId: 'A9-0234/2024' });
// Returns the full metadata for document A9-0234/2024
Input is validated with Zod before any API call. Keyword pattern is restricted to alphanumeric characters, spaces, hyphens, and underscores to prevent injection. Personal data in responses is minimised per GDPR Article 5(1)(c). All requests are rate-limited and audit-logged per ISMS Policy AU-002.
Handles the search_documents MCP tool request.
Searches European Parliament legislative documents by keyword and optional filters, or retrieves a single document by
docId. Supports filtering by document type, date range, and responsible committee. Returned document metadata includes titles, authors, status, and links to PDF/XML versions.