Skip to main content
Glama

get_act_comprehensive_details

Retrieve complete legal act details including metadata, status, dates, and references for Polish legislation from Dziennik Ustaw and Monitor Polski publications.

Instructions

Get complete detailed information about a specific legal act including metadata, status, dates, and references.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
numYesAct number/position within the year
publisherYesPublisher code (DU for Dziennik Ustaw, MP for Monitor Polski)
yearYesPublication year

Implementation Reference

  • app.py:474-520 (handler)
    The handler function `get_act_details` implements the core logic for the `get_act_comprehensive_details` tool. It constructs a Sejm API URL based on publisher, year, and number parameters, performs a GET request, parses the JSON response, and returns the detailed act metadata or an empty dict on error.
    def get_act_details( publisher: Annotated[str, "Publisher code (DU for Dziennik Ustaw, MP for Monitor Polski)"], year: Annotated[int, "Publication year"], num: Annotated[Union[int, str], "Act number/position within the year"] ) -> dict: """Fetches detailed information about a specific legal act from the Sejm API. Retrieves comprehensive metadata for a specific legal act including its title, type, publication dates, effective dates, current status, and other legal attributes. This is essential for legal research and document analysis. Args: publisher: Publication code (e.g., 'DU' for Dziennik Ustaw, 'MP' for Monitor Polski). year: Year of publication as integer. num: Act number/position within the year as integer or string. Returns: dict: Detailed information about the legal act containing ELI identifier, title, type, status, dates, and other metadata. Returns empty dict if act not found. Examples: User asks: "Get details for DU/2020/1280": Parameters: publisher = 'DU', year = 2020, num = 1280 Returns: {'ELI': 'DU/2020/1280', 'title': '...', 'type': 'Obwieszczenie', 'inForce': 'NOT_IN_FORCE', ...} User asks: "Show me information about act MP/2023/45": Parameters: publisher = 'MP', year = 2023, num = 45 User asks: "What is the status of DU/2019/100?": Parameters: publisher = 'DU', year = 2019, num = 100 User asks: "Give me full details of act DU/2022/500": Parameters: publisher = 'DU', year = 2022, num = 500 User asks: "Tell me about the legal act DU/2021/250": Parameters: publisher = 'DU', year = 2021, num = 250 """ logger.debug(f"get_act_details called with: publisher={publisher}, year={year}, num={num}") try: url = f"https://api.sejm.gov.pl/eli/acts/{publisher}/{year}/{num}" logger.debug(f"Making GET request to: {url}") response = requests.get(url, headers={"Accept": "application/json"}) response.raise_for_status() data = response.json() logger.info(f"get_act_details retrieved details for act: {publisher}/{year}/{num}") return data except Exception as e: logger.error(f"Error: {e}") return {}
  • app.py:469-473 (registration)
    The `@app.tool` decorator registers the tool with the MCP framework, specifying the name `get_act_comprehensive_details`, description, and tags. The function signature with Annotated types defines the input schema.
    @app.tool( name="get_act_comprehensive_details", description="Get complete detailed information about a specific legal act including metadata, status, dates, and references.", tags={"analysis", "details", "act-info", "legal-research"} )
  • Input schema defined by function parameters using `typing.Annotated`: publisher (str), year (int), num (Union[int, str]). Output is dict. These annotations likely generate the MCP tool schema.
    def get_act_details( publisher: Annotated[str, "Publisher code (DU for Dziennik Ustaw, MP for Monitor Polski)"], year: Annotated[int, "Publication year"], num: Annotated[Union[int, str], "Act number/position within the year"] ) -> dict:

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