Skip to main content
Glama

get_legal_types

Retrieve all document types used in the Polish legal system, including laws, regulations, and ordinances, for legal research and analysis.

Instructions

Retrieve all document types (laws, regulations, ordinances, etc.) used in Polish legal system.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • app.py:730-764 (handler)
    The handler function `get_types_list` that implements the core logic of the `get_legal_types` tool. It fetches the list of legal document types from the Sejm API endpoint `https://api.sejm.gov.pl/eli/types` and returns it as a list of strings, handling errors gracefully.
    def get_types_list() -> list[str]: """Fetches a list of all possible legal act document types. Retrieves the complete classification of legal document types used in the Polish legal system, including laws, regulations, ordinances, announcements, and other legal instruments. This vocabulary is essential for filtering and categorizing documents. Returns: list[str]: List of document type strings in Polish, representing all possible legal act types. Returns empty list if request fails. Examples: User asks: "What types of legal acts exist?": Returns: ['Ustawa', 'Rozporządzenie', 'Obwieszczenie', 'Zarządzenie', ...] User asks: "Show me all document types available": Returns: ['ustawa', 'rozporządzenie', 'obwieszczenie', 'zarządzenie', ...] User asks: "What kinds of legal documents are there?": Returns: ['akt normatywny', 'akt indywidualny', 'akt prawa miejscowego', ...] User asks: "List all types of Polish legal acts": Returns: ['konstytucja', 'ustawa', 'rozporządzenie', 'uchwała', ...] User asks: "What categories of laws exist in Poland?": Returns: ['akty normatywne', 'akty indywidualne', 'akty prawa wewnętrznego', ...] """ logger.debug("get_types_list called") try: url = "https://api.sejm.gov.pl/eli/types" response = requests.get(url, headers={"Accept": "application/json"}) response.raise_for_status() data = response.json() logger.info(f"get_types_list retrieved {len(data)} types") return data except Exception as e: logger.error(f"Error: {e}") return []
  • app.py:725-729 (registration)
    The registration of the `get_legal_types` tool using the `@app.tool` decorator, specifying the name, description, and tags.
    @app.tool( name="get_legal_types", description="Retrieve all document types (laws, regulations, ordinances, etc.) used in Polish legal system.", tags={"metadata", "types", "reference", "legal-analysis"} )

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/numikel/law-scrapper-mcp'

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