Skip to main content
Glama
metaneutrons

German Legal MCP Server

by metaneutrons

legis:get

Retrieve specific German federal or state legislation by providing jurisdiction and document ID to access full legal texts for research or reference purposes.

Instructions

Retrieve a specific law/norm from German federal or state legislation. BUND: id is "law/section" (e.g., "bgb/823", "gg/Art. 1", "stgb/§ 242"). Länder: id from legis:search results (format varies by state).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesDocument ID. BUND: "law/section" (e.g., "bgb/823", "gg/Art. 1"). Länder: ID from legis:search.
stateYesJurisdiction (e.g., "BUND", "BW", "NW")
save_pathNoSave full document to file instead of returning content.

Implementation Reference

  • The `handleGet` method in `LegisProvider` implements the `legis:get` tool logic by retrieving the legislation using the appropriate adapter based on the state.
    private async handleGet(args: Record<string, unknown>): Promise<ToolResult> {
      const { id, state, save_path } = args as { id: string; state: string; save_path?: string };
      const entry = await this.getAdapter(state).get(state, id);
      validateConversion(entry.content, `Landesrecht ${state}`);
    
      const markdown = `# ${entry.title}\n\n${entry.content}\n\n---\n**Source:** ${entry.url}`;
    
      if (save_path) {
        const { writeFile } = await import('fs/promises');
        await writeFile(save_path, markdown, 'utf-8');
        return { content: [{ type: 'text', text: `Saved to ${save_path}\n\nTitle: ${entry.title}\nURL: ${entry.url}` }] };
      }
    
      return { content: [{ type: 'text', text: markdown }] };
    }
  • Registration of the 'legis:get' tool definition in `src/providers/legis/tools/index.ts`.
    {
      name: 'legis:get',
      description:
Behavior3/5

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

No annotations provided, so description carries full burden. It successfully discloses jurisdiction-specific ID format behaviors (BUND vs Länder patterns) and implies save_path determines output destination. Missing: return content format, error behavior for invalid IDs, and rate limits.

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?

Two sentences, zero waste. Front-loaded with purpose ('Retrieve...'), followed immediately by jurisdiction-specific implementation details. Every word earns its place; German legal abbreviations (BUND, Länder) are used correctly without redundant explanation.

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?

Given 100% schema coverage and no output schema, the description adequately covers the complexity of German legal citation formats (mapping BGB/GG/StGB to ID patterns). Minor gap: does not mention legis:toc sibling for table-of-contents retrieval or describe the actual document format returned.

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

Parameters4/5

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

Schema coverage is 100% with good descriptions. Description adds valuable context beyond schema: the 'stgb/§ 242' example (absent from schema) and explicit note that Länder formats 'vary by state', helping users understand the ID construction complexity.

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?

Clear specific verb ('Retrieve') + resource ('law/norm from German federal or state legislation'). Effectively distinguishes from siblings like arxiv:get (academic papers), eul:get_document (EU law), and dip:get (parliamentary documents) by specifying German legislation domain.

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

Usage Guidelines4/5

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

Provides implicit workflow guidance by stating Länder IDs must come from 'legis:search results', suggesting users should search first for state laws but can directly construct IDs for federal (BUND) laws. Lacks explicit 'when not to use' or direct reference to legis:search as the alternative.

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