Skip to main content
Glama
metaneutrons

German Legal MCP Server

by metaneutrons

legis:search

Search German state legislation across all 16 Bundesländer using keywords to find relevant laws and regulations for legal research.

Instructions

Search German state legislation (Landesrecht) by keyword. Returns results with IDs for retrieval via legis:get. Covers all 16 Bundesländer. BUND does not support search — use legis:get directly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query (e.g., "Polizeigesetz", "Schulgesetz", "PolG")
stateYesState code (e.g., "BW", "BY", "NW"). Not "BUND" — federal law has no search.
limitYesMaximum number of results (default: 10)

Implementation Reference

  • The handler method for 'legis:search' which takes the state and query, retrieves search results from the corresponding adapter, and formats the output as markdown.
    private async handleSearch(args: Record<string, unknown>): Promise<ToolResult> {
      const { query, state, limit = 10 } = args as { query: string; state: string; limit?: number };
      const results = await this.getAdapter(state).search(state, query, limit);
    
      const markdown = results
        .map((r, i) => `${i + 1}. **${r.title}**\n   - ID: \`${r.id}\`\n   - ${r.subtitle}${r.date ? ` (${r.date})` : ''}`)
        .join('\n\n');
    
      return { content: [{ type: 'text', text: `Found ${results.length} results:\n\n${markdown}` }] };
    }
  • The schema and metadata registration for the 'legis:search' tool.
    {
      name: 'legis:search',
      description:
        'Search German state legislation (Landesrecht) by keyword. ' +
        'Returns results with IDs for retrieval via legis:get. ' +
        'Covers all 16 Bundesländer. BUND does not support search — use legis:get directly.',
      inputSchema: z.object({
        query: z.string().describe('Search query (e.g., "Polizeigesetz", "Schulgesetz", "PolG")'),
        state: stateEnum.describe('State code (e.g., "BW", "BY", "NW"). Not "BUND" — federal law has no search.'),
        limit: z.number().optional().default(10).describe('Maximum number of results (default: 10)'),
      }),
    },
Behavior3/5

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

Without annotations, the description carries full burden. It discloses return behavior ('Returns results with IDs') and scope constraints ('BUND does not support search'), but lacks explicit read-only classification, authentication requirements, rate limits, or error handling details.

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?

Four tightly constructed sentences with zero waste. Front-loaded with purpose, followed by sibling relationship, scope coverage, and limitation. Every sentence delivers 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?

For a 3-parameter search tool, the description adequately covers purpose, sibling workflow, geographic scope, and federal limitations. Minor gap in not detailing the exact result structure beyond 'IDs', though this is acceptable without a formal output schema.

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?

Schema has 100% description coverage with examples. The description reinforces the keyword search nature and BUND exclusion, but does not add semantic meaning beyond what the schema already provides (baseline 3 for high coverage).

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 by keyword), resource (German state legislation/Landesrecht), and scope (all 16 Bundesländer). Effectively distinguishes from sibling 'legis:get' by noting this returns IDs for retrieval via that tool.

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 when-not-to-use guidance ('BUND does not support search') and names the correct alternative ('use legis:get directly'). Also clarifies the retrieval workflow ('Returns results with IDs for retrieval via legis:get').

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