dip:search_plenarprotokoll
Search German parliamentary debate transcripts using full-text queries to find discussions on specific topics, legislative periods, or dates.
Instructions
Search Plenarprotokolle (parliamentary debate transcripts) with full text search. Returns protocols where the search term appears in the debate text.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Full text search query (e.g., "Urheberrecht", "UrhDaG") | |
| wahlperiode | No | Legislative period (e.g., 20, 21) | |
| herausgeber | No | BT = Bundestag, BR = Bundesrat | |
| date_start | No | Start date (YYYY-MM-DD) | |
| date_end | No | End date (YYYY-MM-DD) | |
| limit | Yes | Max results (default: 10) |
Implementation Reference
- The main handler function that executes the dip:search_plenarprotokoll tool logic.
export async function handleSearchPlenarprotokoll(client: DipClient, args: Record<string, unknown>): Promise<ToolResult> { const { query, wahlperiode, herausgeber, date_start, date_end, limit = 10 } = args as { query: string; wahlperiode?: number; herausgeber?: string; date_start?: string; date_end?: string; limit?: number; }; const params: Record<string, string | number> = { 'f.text': query, rows: limit }; if (wahlperiode) params['f.wahlperiode'] = wahlperiode; if (herausgeber) params['f.herausgeber'] = herausgeber; if (date_start) params['f.datum.start'] = date_start; if (date_end) params['f.datum.end'] = date_end; const result = await client.searchPlenarprotokollText(params); const text = `${result.numFound} Protokolle\n\n${result.documents.map(formatProtokoll).join('\n\n---\n\n')}`; return { content: [{ type: 'text', text }] }; } - src/providers/dip/tools/index.ts:35-50 (registration)Tool definition and registration schema for dip:search_plenarprotokoll.
description: 'Search legislative processes (Vorgänge) in DIP. Returns Gesetzgebungsvorgänge with status and linked Drucksachen-Nummern. ' + 'Useful for tracking a law through the legislative process or finding all related documents.', inputSchema: z.object({ query: z.string().describe('Search keyword (matched against title)'), vorgangstyp: z.string().optional().describe('Type filter: "Gesetzgebung", "Schriftliche Frage", "EU-Vorlage", etc.'), wahlperiode: z.number().optional().describe('Legislative period (e.g., 20, 21)'), date_start: z.string().optional().describe('Start date (YYYY-MM-DD)'), date_end: z.string().optional().describe('End date (YYYY-MM-DD)'), limit: z.number().optional().default(10).describe('Max results (default: 10)'), }), }, { name: 'dip:search_plenarprotokoll', description: 'Search Plenarprotokolle (parliamentary debate transcripts) with full text search. ' +