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.

Instructions

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

Input Schema

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • app.py:474-519 (handler)
    The handler function `get_act_details` that implements the tool logic: constructs the Sejm API URL from publisher/year/num parameters and fetches comprehensive act details (metadata, status, dates, references). Handles errors by returning empty dict.
    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)
    FastMCP tool registration decorator that binds the `get_act_details` function to the tool name 'get_act_comprehensive_details' with description and tags.
    @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 with type annotations and descriptions, specifying the required inputs for the tool.
    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"]
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is a 'Get' operation (implying read-only), but doesn't mention authentication needs, rate limits, error conditions, response format, or whether it's idempotent. For a tool with no annotation coverage, this leaves significant behavioral gaps.

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?

The description is a single, efficient sentence that front-loads the core purpose and lists key information areas. Every word earns its place with no redundancy or unnecessary elaboration.

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 the tool has an output schema (which handles return values), 100% schema coverage for parameters, and no complex nested structures, the description provides adequate context. However, the lack of usage guidelines and minimal behavioral transparency for a read operation with no annotations keeps it from being fully complete.

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 description coverage is 100%, so the schema fully documents all three parameters. The description doesn't add any parameter-specific information beyond what's in the schema, maintaining the baseline score of 3 for adequate but not enhanced parameter documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and resource 'complete detailed information about a specific legal act' with specific content areas (metadata, status, dates, references). It distinguishes from siblings like get_act_content (which likely returns just content) and get_act_relationships (which likely focuses on connections), but doesn't explicitly name alternatives.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like get_act_content or get_act_relationships. It doesn't mention prerequisites, exclusions, or comparative contexts, leaving the agent to infer usage from tool names alone.

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

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