Skip to main content
Glama
metaneutrons

German Legal MCP Server

by metaneutrons

dip:search

Search German parliamentary documents (Bundestagsdrucksachen) by title to find legislation drafts, inquiries, and reports with metadata and PDF links.

Instructions

Search Bundestagsdrucksachen (parliamentary documents) via DIP API. Matches against document title — not full text. Returns metadata: Dokumentnummer, title, type, date, PDF URL. Use dip:get to retrieve full text (e.g., Gesetzesbegründung) of a specific Drucksache.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch keyword (matched against title)
typeNoDrucksachetyp filter: "Gesetzentwurf", "Beschlussempfehlung und Bericht", "Kleine Anfrage", "Große Anfrage", "Antrag", etc.
wahlperiodeNoLegislative period (e.g., 20, 21)
herausgeberNoBT = Bundestag, BR = Bundesrat
date_startNoStart date (YYYY-MM-DD)
date_endNoEnd date (YYYY-MM-DD)
limitYesMax results (default: 10)

Implementation Reference

  • The 'handleSearch' function implements the logic for 'dip:search' by calling the 'searchDrucksachen' method of the 'DipClient' and formatting the results.
    export async function handleSearch(client: DipClient, args: Record<string, unknown>): Promise<ToolResult> {
      const { query, type, wahlperiode, herausgeber, date_start, date_end, limit = 10 } = args as {
        query: string; type?: string; wahlperiode?: number; herausgeber?: string;
        date_start?: string; date_end?: string; limit?: number;
      };
    
      const params: Record<string, string | number> = { 'f.titel': query, rows: limit };
      if (type) params['f.drucksachetyp'] = type;
      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.searchDrucksachen(params);
      const text = `${result.numFound} Treffer\n\n${result.documents.map(formatDoc).join('\n\n---\n\n')}`;
      return { content: [{ type: 'text', text }] };
    }
  • The definition and input schema for the 'dip:search' tool.
    {
      name: 'dip:search',
      description:
        'Search Bundestagsdrucksachen (parliamentary documents) via DIP API. ' +
        'Matches against document title — not full text. ' +
        'Returns metadata: Dokumentnummer, title, type, date, PDF URL. ' +
        'Use dip:get to retrieve full text (e.g., Gesetzesbegründung) of a specific Drucksache.',
      inputSchema: z.object({
        query: z.string().describe('Search keyword (matched against title)'),
        type: z.string().optional().describe('Drucksachetyp filter: "Gesetzentwurf", "Beschlussempfehlung und Bericht", "Kleine Anfrage", "Große Anfrage", "Antrag", etc.'),
        wahlperiode: z.number().optional().describe('Legislative period (e.g., 20, 21)'),
        herausgeber: z.enum(['BT', 'BR']).optional().describe('BT = Bundestag, BR = Bundesrat'),
        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)'),
      }),
    },
  • Registration of the 'dip:search' tool in the provider's tool call handler.
    case 'dip:search': return handleSearch(this.client, args);
Behavior4/5

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

No annotations provided, so description carries full burden. Discloses critical behavioral traits: title-only matching (not full text), and specific return values (Dokumentnummer, title, type, date, PDF URL). Does not mention rate limits or pagination mechanics, but covers essential operational constraints.

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?

Extremely efficient three-sentence structure. Front-loads core functionality, immediately clarifies limitation (title vs full text), specifies return format, and concludes with sibling reference. Zero redundancy; every clause provides distinct value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, but description compensates by enumerating exact metadata fields returned. Given 7 well-documented parameters and clear sibling relationships, description is complete for tool selection. Minor gap: does not clarify if results are paginated or how limit interacts with total results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has 100% description coverage, establishing baseline 3. Description reinforces the 'query' parameter's scope (title matching) but does not add syntax details, format examples, or semantic elaboration beyond what the schema already provides for the 7 parameters.

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?

States specific action (Search) + resource (Bundestagsdrucksachen/parliamentary documents) + API context (DIP). Explicitly distinguishes scope from siblings by clarifying it matches 'document title — not full text' and contrasts with dip:get for full text retrieval.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit workflow guidance: 'Use dip:get to retrieve full text... of a specific Drucksache.' Clearly defines when to use this tool (searching/metadata) versus the alternative (retrieving full content), effectively establishing the tool's position in a two-step workflow.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/metaneutrons/german-legal-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server