get_legal_statuses
Retrieve all available legal act statuses like active, repealed, and consolidated to classify and filter legal documents for research and analysis.
Instructions
Get all possible legal act statuses (active, repealed, consolidated, etc.) for document classification and filtering.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- app.py:689-723 (handler)The handler function get_statuses_list() that fetches and returns the list of all possible legal act statuses from the Sejm API. It makes a GET request to https://api.sejm.gov.pl/eli/statuses and returns the JSON data as a list of strings, or empty list on error.def get_statuses_list() -> list[str]: """Fetches a list of all possible legal act statuses. Retrieves the complete vocabulary of legal act statuses used in the Polish legal system, including active, repealed, consolidated, and other status classifications. This is essential for filtering and understanding the current legal standing of documents. Returns: list[str]: List of status strings in Polish, representing all possible legal act statuses. Returns empty list if request fails. Examples: User asks: "What are the possible act statuses?": Returns: ['akt indywidualny', 'akt jednorazowy', 'akt objęty tekstem jednolitym', ...] User asks: "Show me all legal act status types": Returns: ['obowiązujący', 'uchylony', 'wygaśnięcie aktu', ...] User asks: "What statuses can a Polish law have?": Returns: ['akt obowiązujący', 'akt uchylony', 'tekst jednolity', ...] User asks: "List all possible statuses for legal documents": Returns: ['aktywny', 'nieaktywny', 'zmieniony', ...] User asks: "What are the different states a law can be in?": Returns: ['obowiązujący', 'uchylony', 'wygaśnięty', ...] """ logger.debug("get_statuses_list called") try: url = "https://api.sejm.gov.pl/eli/statuses" response = requests.get(url, headers={"Accept": "application/json"}) response.raise_for_status() data = response.json() logger.info(f"get_statuses_list retrieved {len(data)} statuses") return data except Exception as e: logger.error(f"Error: {e}") return []
- app.py:684-688 (registration)Registration of the 'get_legal_statuses' tool using the @app.tool decorator from FastMCP, including name, description, and tags.@app.tool( name="get_legal_statuses", description="Get all possible legal act statuses (active, repealed, consolidated, etc.) for document classification and filtering.", tags={"metadata", "statuses", "reference", "legal-analysis"} )
- app.py:689-689 (schema)Output schema defined by the function return type annotation: list[str], indicating the tool returns a list of status strings.def get_statuses_list() -> list[str]: